Skip to content

Disable dataframe horizontal scrollbar #2543

@WavyV

Description

@WavyV

Summary

When using streamlit.dataframe to show an interactive dataframe table, the horizontal scrollbar is always enabled. To show the last digits in the right most column, you always need to scroll. The width parameter of the dataframe only works to decrease the standard width - increase does not work.

Steps to reproduce

Simple code to reproduce:

import pandas as pd
import numpy as np
import streamlit as st

df = pd.DataFrame({
    "A": np.random.randint(0, 10000, 100),
    "B": np.random.randint(0, 10000, 100),
    "C": np.random.random(100) * 10
})

st.dataframe(df)

Behavior

Screenshot of current output below. I expect the horizontal scrollbar to not be there when there is plenty of space for the dataframe to be shown in its entirety.

afbeelding

Is this a regression?

Don't know, first time using streamlit.

Debug info

  • Streamlit version: 0.73.1
  • Python version: 3.8.5
  • Using a Conda venv
  • OS version: Windows 10 Education 20H2
  • Browser version: Firefox 84.0.1 (64-bits)

Metadata

Metadata

Assignees

Labels

area:stylingRelated to styling and appearancefeature:st.dataframeRelated to the `st.dataframe` elementtype:bugSomething isn't working as expectedtype: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