Summary
I have an app in which I read a dataframe and pass it to AgGrid. Passing the retrieved dataframe to st.dataframe works fine.
Steps to reproduce
Code snippet:
try:
with st.spinner(text="Getting data..."):
df = read_file(client, dte)
col1.success("Data retrieved successfully!")
with col2:
dftab1, dftab2 = st.tabs(["All", "Exceptions"])
with dftab1:
AgGrid(df)
# st.dataframe(df)
with dftab2:
excs_df = get_exceptions(df) #filters dataframe
if not excs_df.empty:
AgGrid(excs_df)
# st.dataframe(excs_df)
else:
st.success("Recon haas not exceptions!")
except FileNotFoundError:
...............
Expected behavior:
I expect the dataframe to render fine with no app freezing.
Actual behavior:
- My app freezes completely.
- Dataframes fail to render.
- I see the following warning in my terminal
C:\Users\xxx\.virtualenvs\myapp_env\lib\site-packages\st_aggrid\__init__.py:42: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead.
for c, d in dataframe.dtypes.iteritems():
Debug info
- Streamlit version:
streamlit~=1.19.0
,streamlit-aggrid~=0.3.3
- Python version:
3.8
- Using
pipenv
- OS version:
- Browser version: Chrome
Requirements file
File contains the following:
streamlit~=1.19.0
streamlit-option-menu~=0.3.2
streamlit-aggrid~=0.3.3
Pillow~=9.4.0
pandas~=1.5.3
fsspec
s3fs