Spaces:
Build error
Build error
Update app.py
Browse files1 unmodified line234567810 unmodified lines19202122232461 unmodified lines86878889909154 unmodified lines1461471481491501511 unmodified lineimport pandas as pdimport datetime as dtimport matplotlib.pyplot as pltimport io# Function to load data from the local CSV file@st.cache_data10 unmodified lines# Function to save data to the local CSV filedef save_data(df):df.to_csv('patient_data.csv', index=False)# Sidebar: Select or create patientaction = st.sidebar.selectbox("Action", ["Select Patient", "Create New Patient"])61 unmodified lines"Other Notes": other_notes,}df = pd.concat([df, pd.DataFrame([new_entry])], ignore_index=True)# Save the updated data to CSVsave_data(df)54 unmodified lines"Other Notes": None,}df = pd.concat([df, pd.DataFrame([new_patient])], ignore_index=True)# Save the updated data to CSVsave_data(df)1 unmodified line234567810 unmodified lines1920212223242561 unmodified lines8788899091929354 unmodified lines1481491501511521531541 unmodified lineimport pandas as pdimport datetime as dtimport matplotlib.pyplot as pltimport os# Function to load data from the local CSV file@st.cache_data10 unmodified lines# Function to save data to the local CSV filedef save_data(df):df.to_csv('patient_data.csv', index=False)st.write("Data saved successfully.")# Sidebar: Select or create patientaction = st.sidebar.selectbox("Action", ["Select Patient", "Create New Patient"])61 unmodified lines"Other Notes": other_notes,}df = pd.concat([df, pd.DataFrame([new_entry])], ignore_index=True)st.write("New entry added to DataFrame.")# Save the updated data to CSVsave_data(df)54 unmodified lines"Other Notes": None,}df = pd.concat([df, pd.DataFrame([new_patient])], ignore_index=True)st.write("New patient added to DataFrame.")# Save the updated data to CSVsave_data(df)
app.py+4-1