问题
在 Streamlit 里做数据应用的开发者,遇到三类表格显示痛点:st.dataframe 的单元格不支持 hover tooltip,长文本列只能截断("Especially useful for long text in columns");展示 multiindex pandas 表(如透视表)时重复 index 值全部原样重复,"it is not readable",只能退回 pandas 渲染 HTML;selectbox/multiselect 的选项无法加 hover 说明,用 format_func 把员工编号塞进标签后 "the UI now looks ugly and terribly cluttered"。三个 issue 共计 230+ 分、38 条评论,但都是中低强度痛点(pain 2-3),且用户预期 Streamlit 官方来解决。
目标用户
用 Streamlit 构建数据应用、需要展示 multiindex 透视表或长文本列的开发者和数据分析师。市场是 Streamlit 开发者生态的一个子集,规模中等但付费习惯弱。
解决方案
核心是一个 Streamlit custom component,作为 st.dataframe 的增强替代:- 接收任意 pandas DataFrame(含 multiindex),自动稀疏化重复 index 值,复刻 pandas 控制台的显示效果- 支持传入 tooltip 字典/列,鼠标悬停单元格时展示格式化文本或 Markdown- 后续版本可为 st.selectbox / st.multiselect 封装带 hover_func 的变体,解决重名选项的歧义- AI 角色很弱:本机会本质是前端表格渲染工程,LLM 最多用于按 schema 自动生成 tooltip 文案,不是核心
MVP 范围
第一个版本只做一件事:接收 pandas DataFrame(含 multiindex),用 custom component 渲染出稀疏化 index、可配置的单元格 hover tooltip。不做:selectbox/multiselect 的 hover_func、复杂样式主题、大数据量虚拟滚动优化(先支持几千行以内)。
风险
平台依赖风险最大:这是给 Streamlit 做的第三方组件,官方任何一个版本迭代(如 column_config 增强)都可能原生实现这些功能;变现风险:全部信号 willingness_to_pay 为 none,几乎只能走开源 + 声誉路线;需求强度风险:pain 仅 2-3,用户已有 HTML 渲染、format_func 等凑合的 workaround,付费意愿和留存都存疑。
已有产品
| 产品 | 定位 | 价格 |
|---|---|---|
| st.dataframe | 现有表格渲染组件,缺少单元格 tooltip 和 multiindex 稀疏显示 | — |
| st.column_config | 官方列配置 API,用户建议用它绕过 tooltip 需求,但未覆盖 hover 场景 | — |
| streamlit | 机会所在的平台本身;三个信号都是对它的官方功能请求,官方实现会直接消灭这个机会 | — |
信号证据
这张卡片依据的原始讨论。摘录保持原文,点“原文”查看上下文。
GitHub Issues · streamlit/streamlit10月17日功能请求▲ 584 条评论
“Display the tooltip on st.dataframe while hovering on cell. Display alternate value or any other text/markdown allowed on tooltips when hovering over cells. Especially useful for long text in columns.”
Streamlit users want to show a tooltip with alternate or formatted text when hovering over cells in st.dataframe, especially for long column text.原文
GitHub Issues · streamlit/streamlit9月19日功能请求▲ 13832 条评论
“I'm always frustrated when I am trying to display the multiindex dataframe, but it is not readable”
Displaying multiindex dataframes in Streamlit's st.table/st.dataframe is unreadable because duplicate index values are repeated instead of sparsified.原文
GitHub Issues · streamlit/streamlit9月10日功能请求▲ 412 条评论
“This technically solves the problem I'm having, but the UI now looks ugly and terribly cluttered.”
Streamlit developers can't disambiguate duplicate-looking entries in selectbox/multiselect widgets because labels can't have hover tooltips.原文