New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting dataframe width doesn't have effect #4931
Comments
@alexscott-ff Thanks for reporting this issue.
That's indeed the reason why it currently fails to set the width. Unfortunately, there is no good workaround at the moment to fix this with |
Sounds good, thanks for the quick response @LukasMasuch ! |
Has there been any updates on this? This makes Dataframes unusable right? |
Has there been any updates on this? I had same problems. |
any updates? this df behavior makes my eye tick! |
I have the same issue. I can use I think if it could just take the header width into account when sizing the columns that might help, though I'd still eventually want the width parameter to have an effect. |
+1 for this, the current implementation is unusable, I have to use |
Summary
Providing
st.dataframe
a width doesn't seem to have the desired effect.Steps to reproduce
Code snippet:
That's the output of the table, regardless of whether I give the
width
argument or not.Expected behavior:
The table width is set to the integer number of pixels and the column widths are dispersed evenly within that width.
Actual behavior:
The table doesn't change size.
Is this a regression?
Don't think so.
Debug info
Additional information
I believe this is due to the columns themselves not having width and just taking enough width to fit the values. But the header values (column names) seem to get ignored when making that calculation.
I tried to play around with the CSS but due to Canvas was unable to do things easily in inspection mode in the browser.
As an aside, would really like a full-width, responsive dataframe option (potentially as default).
The text was updated successfully, but these errors were encountered: