streamlite.write()方法出现问题,pandas数据框未显示所有信息。

huangapple go评论75阅读模式
英文:

Trouble with streamlite.write() pandas dataframe does not show all information

问题

以下是要翻译的内容:

我正在使用st.write()来显示一个包含长字符串的数据框中的列。当我使用st.write(df)显示数据框时,它没有显示所有信息,这里是一个示例:

以下是代码:

with st.container():
    st.write('<style>div[data-baseweb="table"] .cell {white-space: pre-wrap;}</style>', unsafe_allow_html=True)
    st.dataframe(df_observaciones, width=1500, height=450)

我想查看所有信息,并在必要时包括换行符,任何帮助都将很有用。

英文:

I'm using st.write() to display a dataframe with long strings in a column. When i display the dataframe with st.write(df) it does not show all info, here is an example:

Here is the code:

with st.container():
     st.write(&#39;&lt;style&gt;div[data-baseweb=&quot;table&quot;] .cell {white-space: pre-wrap;}&lt;/style&gt;&#39;, 
     unsafe_allow_html=True)
     st.dataframe(df_observaciones, width=1500, height=450)

streamlite.write()方法出现问题,pandas数据框未显示所有信息。

I want to see all the info and include line breaks if necesary, any help will be good.

答案1

得分: 0

st.table(df) 会显示所有信息。您可以在 https://docs.streamlit.io/library/api-reference/data/st.table 上找到更多信息。

英文:

One easy option is to use st.table(df), shows all the info.

huangapple
  • 本文由 发表于 2023年2月16日 01:48:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/75463643.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定