Spaces:
Sleeping
Sleeping
Fix bug thanks to claude-3.5-sonnet
Browse files
app.py
CHANGED
@@ -58,11 +58,10 @@ def show_data_editor(filtered_df: pd.DataFrame, key: str):
|
|
58 |
key=key)
|
59 |
|
60 |
if edited_df is not None and not edited_df.equals(filtered_df):
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
st.session_state.df = original_df
|
66 |
|
67 |
|
68 |
def display_data(filtered_df: pd.DataFrame):
|
|
|
58 |
key=key)
|
59 |
|
60 |
if edited_df is not None and not edited_df.equals(filtered_df):
|
61 |
+
main_df = st.session_state.df
|
62 |
+
edited_indices = edited_df.index
|
63 |
+
main_df.loc[edited_indices] = edited_df.loc[edited_indices]
|
64 |
+
st.session_state.df = main_df
|
|
|
65 |
|
66 |
|
67 |
def display_data(filtered_df: pd.DataFrame):
|