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