Skip to content

Let user set decimals in st.dataframe #4904

@PaleNeutron

Description

@PaleNeutron

Streamlit keeps 4 decimals by default, but in some cases user need 2 decimals.

df = pd.DataFrame(
    np.random.randn(50, 20),
    columns=('col %d' % i for i in range(20)))

st.dataframe(df)  # Same as st.write(df)

image

Please add an argument that allow user set decimals of st.dataframe.


Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.

If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.dataframeRelated to the `st.dataframe` elementtype:enhancementRequests for feature enhancements or new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions