Thanks to @Asaurus1 for the idea here.
Note the example in this repo (which can be run using streamlit run app.py
) includes an example of preserving st.data_editor()
objects between pages using the global state using this module. If you don't care about that, just delete everything having to do with the streamlit_dataframe_editor_global
module in the examples and then you have a purely idiomatic set of examples for using the global state.