Ability to set dataframe column width
See original GitHub issueSee: https://discuss.streamlit.io/t/is-there-a-way-to-specify-column-width-for-dataframe-table/333
st.dataframe
tries to be smart about column sizes, but often misses the mark — so users end up with dataframes that have truncated/ellipsized values.
On Jupyter, you can apply a width-modifying Styler to a dataframe like this: https://stackoverflow.com/a/39680725
We should add support for something like that in Streamlit.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:67
- Comments:25 (2 by maintainers)
Top Results From Across the Web
Can I set variable column widths in pandas? - Stack Overflow
I've not found an obvious way to set individual columns but this approach only scales up those that need more space to the...
Read more >Pandas Column Width - Calmcode
In this short introduction we're doing to demonstrate how to use Pandas Column Width. ... you can use the pd.set_option method to set...
Read more >Pandas: How to Set Column Widths - Statology
This tutorial explains how to specify a column width for a pandas DataFrame, including examples.
Read more >6 Pandas Display Options You Should Memorise
6 Pandas Display Options You Should Memorise · 1. Set Max Number of Rows · 2. Set Max Number of Columns · 3....
Read more >Simple Guide to Set Pandas Options to Better Display ...
display.max_colwidth - This option accepts integer value which let us width of columns. If our data frame cell has values that are more ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any timeline for this (much wanted) feature? Thanks!
The new st.dataframe enforces column width based on its contents while truncating the header, which leads to “squeezing” of the rendered dataframe and unreadability of the header in some cases. Manual column resizing can partially solve this problem (except for the rightmost column), but it is inconvenient for the user when the number of columns is high. Previous UI allowed the dataframe to use all available screen width (in wide layout mode), didn’t truncate the header and displayed full column header text in a popup window on hover.
It would be nice to have access to “old-style” st.dataframe UI or the option to prevent header truncating in future updates.