Skip to content

Instantly share code, notes, and snippets.

View sfc-gh-dmatthews's full-sized avatar

Debbie Matthews sfc-gh-dmatthews

View GitHub Profile
@sfc-gh-dmatthews
sfc-gh-dmatthews / home.py
Created August 8, 2023 01:08
Stateful Streamlit data editory
#Put home.py in a working directory. Put page_1.py and page_2.py in a folder named pages.
import streamlit as st
import pandas as pd
def initialize():
# the data
st.session_state.df1 = pd.DataFrame({'A':[1,2],'B':[3,4]})
st.session_state.df2 = pd.DataFrame({'A':[1,2],'B':[3,4]})
# the shadow data