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
DataFrames in columns intermittently overlapping. #4914
Comments
thanks for reporting this! I see that you are using our old dataframe implementation in Streamlit 1.7. Could you upgrade Streamlit to >=1.10 and see if this still happens? We updated the UI for st.dataframe in 1.10, so maybe this might already fix your problem! |
@jrieke: Unfortunately, looks like this issue is still present with streamlit version 1.10, so we could explore overflow styling for tables: @christian-cooper-shell: I believe you should be able to achieve the intended behavior for your use case by using import pandas as pd
import streamlit as st
st.set_page_config(layout='wide', page_title='Example', initial_sidebar_state='expanded')
st.sidebar.write('Close sidebar and issue sometimes goes away')
# Build a bunch of data to display
df1 = pd.DataFrame(data=[[1, 2, 3], [4, 5, 6], [7, 8, 9]], index=[0, 1, 2], columns=['AA', 'BB', 'CC'])
df4 = (df1 * 111).rename(columns={'AA': 'DD', 'BB': 'EE', 'CC': 'FF'}).copy()
df2 = df1.join(df4) * 1000
df3 = df4.join(df1) * 11111
# Display data
c1, c2, c3, c4 = st.columns((3, 4, 5, 3))
c1.subheader('Frame 1')
c1.write(df1)
c2.subheader('Frame 2')
c2.write(df2)
c3.subheader('Frame 3')
c3.write(df3)
c4.subheader('Frame 4')
c4.write(df4) |
@jrieke @mayagbarnes Thanks for the suggestions and work around guys. And I'll be sure to add updating to a later version of Streamlit to my ever increasing list of things to do! :) |
Oh yeah that's what I meant, use |
Summary
I have a multi-column layout, with each column containing a DataFrame with some styling, occasionally when rendering I'm seeing the right-most columns of one DataFrame overlapping the left-most columns of the DataFrame in the adjacent column to the right.
Steps to reproduce
Code snippet:
Steps we should take to reproduce the bug:
Expected behaviour:
Each data frame is displayed restricted to the boundaries of its parent column. All columns to be clearly visible without overlapping.
Actual behaviour:
Columns are intermittently seen overlapping like so:
Is this a regression?
Not sure - on prior occasions I remember seeing scroll bars attached to the data frame if it was too wide.
Debug info
The text was updated successfully, but these errors were encountered: