Streamlit dataframe renders are buggy at random times


Hi Community, I have created an app where based on certain inputs from a user, the app renders two pandas dataframe in two seperate columns with one of the input parameters being use_container_width = True

As and when I try and play around with the number of rows in the dataframe, the app starts acting jittery, I am not sure what might be causing this, if I set the container width to False, the issue is not there but I don’t want the page to feel empty.

Steps to reproduce

Code snippet:

colA.subheader("Option 1: Bought Home 🏠")
    colB.subheader("Option 2: Invested in Financial Instruments πŸ’°")

    home_df = bought_home_df(home_loan_duration, age, home_loan_value, home_loan_interest, rental_yield, 
                        rent_inflation, income_tax_bracket, property_value, tax_regime)
    colA.dataframe(home_df, use_container_width=True, hide_index = True)

    investment_df = financial_investment_df(home_df, return_on_investments, property_value, home_loan_value, income_tax_bracket, tax_regime)
    colB.dataframe(investment_df, use_container_width=True, hide_index = True)

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:

The code should render both the dataframes properly

Actual behavior:

See video here

Debug info

  • Streamlit version: 1.25.0
  • Python version: 3.11.4
  • Using Conda: Yes
  • OS version: Latest windows
  • Browser version: Brave v1.57.57

Additional information

The app is local at this stage

Hey @yash12392, it’s good to see you back on our forums! :raised_hands:

I’m actually not too sure if that jittery behavior is a bug :bug:.

@lukasmasuch, what do you think?


1 Like

This is probably related to some recent changes in chromium to the scrollbar behavior. We have a potential fix for this that we will merge in soon.

1 Like

Thanks @lukasmasuch! :raised_hands:

Thank you both!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

Streamlit 1.32.0 is now available. We’ve upgraded our glide-data-grid dependency to fix numerous dataframe issues. Give it a try! :heart:

1 Like