I want to display a dataframe with st.table but I get the error “Dataframe dimensions don’t align” when the index doesn’t increment by 1.
A trivial example that doesn’t work:
my_table = pd.DataFrame({“A”:range(1,121,1)},index=range(1,241,2))
st.table(my_table)
Note that st.text(my_table) does work ok or making the index increment by 1 also works. I can also display the dataframe with no problem in a Jupyter Notebook.
Debug info
- Streamlit version: 0.87.0
- Python version: 3.6.2
- OS version: Red Hat Enterprise Linux Workstation 7.9
- Browser version: Firefox 102.3.0esr