Hi all,
I am facing a problem that when I return a table using “st.table(cap_stats)”, the following error message appears: StreamlitAPIException : (“Expected bytes, got a ‘int’ object”, ‘Conversion failed for column Uncapped with type object’)
I read in some places that it is bug that came with Streamlit 0.85.0, and a possible workaround is to convert DataFrame cells to strings with df.astype(str)
. I made it and it worked - see below.
test = df_selected_team.astype(str)
st.dataframe(test)
But another solution is to use the old dataframe serializer by setting this in your .streamlit/config.toml.
[global]
dataFrameSerialization = "legacy"
Two questions:
- Is it a Streamlit bug?
- Where can I find the config.toml file?
Thank you