I put a streamlit app on aws with which I upload a simple excel file that is read by pandas library. I activated the @st.cache_data decorator (previously it was st.experimental_memo with the option to suppress the warning), but unfortunately a warning appears.
It looks like a bug. How can I fix it without downgrading and going back to the old version of streamlit? Thank you
Hey @Fabio_Pasquarella , can you please share your github repo or code snippet ?
Hello, here you are:
@st.cache_data
def load_excel():
object = client.get_object(Bucket='<NAME>', Key='x.xlsx')
data = object['Body'].read()
df = pd.read_excel(io.BytesIO(data))
df.dropna(inplace=True, axis=1, how='all')
return df
please is there anyone who can tell me something about this issue? Thank you
Goyo
September 5, 2023, 6:55am
5
The warning doesn’t come from the code you posted. It comes from some other part of the code where st.cache
is being used.
@Goyo you’re right, there was a piece of code that shouldn’t have been there, thank you
system
Closed
September 7, 2023, 3:11pm
7
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.