Dataframe Size

I am attemtping to change the size of my dataframe using the height and width arguments and they don’t appear to be “fully” working. It appears that the height and width parameters reach a maximum size at some point. However, the maximum size equates to approximately 1/3 of my monitor size so it is making it difficult to visualize the contents of the dataframe.

As an example, the following display data commands provide the exact same results on my screen:

st.dataframe(data=new_df, width=700, height=768)
st.dataframe(data=new_df, width=1024, height=768)

Does anyone have any suggestions?

Hi @Jacob_Dykstra, thanks for your question. Can you provide a dataframe example with some data, so that I can try out your code quickly? As a note, we max out the UI size of the dataframe to the maximum number of rows and columns that are present in that dataframe, so if you have few columns, we will show those few columns regardless the width parameter. This might not be your case, but just in case.


Thanks for the response. Since originally writing this post I found the “show app in wide mode” setting within my web browser and this has helped view dataframes with a significant number of columns. Is this the best way to address the “width” issue when it comes to viewing a dataframe with numerous columns? If so, is there anyway to make the “wide mode” the default setting in the future so users don’t have to adjust this setting on their own each time they view the data?

Thanks @Jacob_Dykstra, I am trying to understand if it is a bug on our end or if you feel that we don’t do a good job at using the estate on the page. If there are many columns, the expectation is that we maximize the number of columns shown. We do limit this to the “main column” width, so by “maximizing” you get more.
For example, in this test:

import streamlit as st
import pandas as pd
df = pd.DataFrame([[33,]*1000])

We show
Not maximized:


This is as intended, but I agree you may feel the first screenshot leave out lot of blank space. In any case, enabling wide mode by default seems like an interesting feature request. Can you log it formally here?



Already in the issues list
I just added a +1 to it. My app is designed for wide mode and I’d really like it to be at least a configuration default.

1 Like