Use_container_width not working

Summary

I’m trying to use the function use_container_width = True so that my dataframe will take up the entire width of the page.

Steps to reproduce

Code snippet:

df2 = pd.DataFrame(table)
st.dataframe(df2)

It should reproduce the dataframe and have it take up the entire width of the page.

Instead I get this error:
TypeError: dataframe() got an unexpected keyword argument ‘use_container_width’

What unusual is that the use_container_width function works for my plotly graph as this code:
st.plotly_chart(fig, use_container_width=True)
doesn’t result in any error.

1 Like

Your code works for me and it keeps working when I add use_container_width=True to the call. What version of streamlit are you using?

Ah yea I updated streamlit and now it works, thanks.

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