Hi @knorthover
Streamlit can draw dataframes in two different ways:
- With
st.dataframe(df)
, to show a scrollable / sortable / interactive table. This is whatst.write
and magic use behind the scenes. - With
st.table(df)
, to show a static table.
Both methods support dataframe Stylers, but as you found out they only support a subset of styles: only colors and display values. Which means we today ignore width settings in Stylers.
(BTW, I created a feature request for you here)
That said, between st.dataframe
and st.table
, only the former truncates columns at all. That is, st.table
shows tables in their entirety: no truncation, no scrolling, just the whole table.
So a work-around for you would be to use st.table
for now.