Summary
Hi, everyone! How can I use st.date_editor with session state? In this project, the user can edit some data and the run an analysis. The problem is that apparentely there is no session state when it comes to st.date_editor. Iāve seen in a forum a solution which basically saves the edited df to a static df with āon_changeā method, but I couldnt reproduce it.
Steps to reproduce
Code snippet:
st.session_state['id_dados_gerais'] = (st.session_state['df_dados_gerais_unidades'].loc[st.session_state['df_dados_gerais_unidades']['Unidade'] == st.session_state['cliente']])
st.data_editor(st.session_state['id_dados_gerais'], hide_index=True, column_order=('Distribuidora', 'Classe de TensĆ£o', 'Modalidade TarifĆ”ria', 'Demanda Contratada Ponta', 'Demanda Contratada Fora Ponta', 'Desconto', 'CDE Covid', 'CDE Escassez HĆdrica', 'ComunhĆ£o'), disabled=('Distribuidora', 'Classe de TensĆ£o'))
So basically the user edits some data in the st.session_state[āid_dados_geraisā] and then the data provided would be used to do an analysis.
Expected behavior:
Use the edited data to run the analysis
Actual behavior:
The analysis is made with the original data.
Thank you in advance!