I’m working with a site’s API for data retrieval, and I have been using st.cache on my functions with the calls in order to only make new requests when necessary (great functionality, thanks!). Currently, I am hoping to keep my getting and cleaning functions separate.
The issue I am having right now unfortunately is that, from what I can tell, pandas is unable to cache the messy data that the API is returning to me.
My question is what the suggested work flow might be to use Streamlit effectively here; will I only be able to cache the clean dataframe, in which case I will have to use a non-cached function within my cached request function that is run each time for cleaning?
Here is my current output.
The first st.dataframe() is within my cached function and working as expected; the error is from a second st.dataframe() that sits outside my cached function so that, ideally, an st.dataframe() isn’t displayed every time I request something from the API.
Sorry for what is most likely an unclear and/or amateur question; thanks for the community platform and the opportunity to use Streamlit!