I’m trying to use a dataframe created with pandas from an uploaded excel file but I get this error:
StreamlitAPIException: ("Expected bytes, got a 'datetime.datetime' object", 'Conversion failed for column alc with type object') Traceback: File "C:\Users\User\app.py", line 56, in <module> st.dataframe(df)
I tried to exclude the datetime dtype by both of these two codes separately:
df = df.select_dtypes(exclude=['datetime64'])
df = df.select_dtypes(exclude=['datetime64[ns]'])
and I put them after this code:
df = pd.read_excel(uploaded_file, engine='openpyxl')
but still get the same error.
Here is the link to the excel file.