Edit data with AgGrid and preserve the changed dataframe?

Hey there,

I have a simple dataframe based on a small csv that I import to Streamlit with the drag and drop function. I’m utilizing AgGrid to make the dataframe editable. The only problem is that I cannot get st.session_state to save the updated dataframe when i refresh or navigate to another page in the app. Any suggestions? To display the editable dataframe is on line of code as follows:

def topset_data_editable2():
global df_topset
j = AgGrid(df_topset, editable = True)

My dataframe from the csv is df_topset