Search code examples
pythonpandasstreamlit

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


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

enter image description here

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


Solution

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