streamlit / streamlit

Streamlit — A faster way to build and share data apps.

Home Page:https://streamlit.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extra-small column width in dataframes

LasseDamtoft opened this issue · comments

Checklist

  • I have searched the existing issues for similar feature requests.
  • I added a descriptive title and summary to this issue.

Summary

I have a dataframe for a sports league and with a games (and other) column called "G" and numerical values of 1-2 digits.

On a desktop the dataframe looks fine, because there is usually enough space to view the entire dataframe, but on mobile screens, you have to scroll left-right to see all columns. This could be mitigated by columns being more narrow.

For now the minimum width a column can have is wide enough to contain four numerical digits, which would be nice if this could be lowered. If I use the width="small" value in the column_config the columns become even wider, so a solution could be an "even-smaller" width option or even a numerical one or simply that the minimum width is lowered.

This is as small/narrow as it will go, but as can be seen the contents would still be visible at half the width.
st_df_col_width

Why?

It would allow to fit more simple columns into a screen without scrolling and as such improve user experience.

How?

A solution could be an "even-smaller" width option or even a numerical one or simply that the minimum width is lowered to allow for columns containing only a single digit/character.

Additional Context

No response

To help Streamlit prioritize this feature, react with a 👍 (thumbs up emoji) to the initial post.

Your vote helps us identify which enhancements matter most to our users.

Visits