ppsingh commited on
Commit
9a74b5c
1 Parent(s): c4b0561

explore dataframe filtering

Browse files
Files changed (1) hide show
  1. appStore/target.py +13 -1
appStore/target.py CHANGED
@@ -232,7 +232,19 @@ def filter_dataframe(df: pd.DataFrame) -> pd.DataFrame:
232
  )
233
  if user_text_input:
234
  df = df[df[column].str.contains(user_text_input)]
235
-
 
 
 
 
 
 
 
 
 
 
 
 
236
  return df
237
 
238
 
 
232
  )
233
  if user_text_input:
234
  df = df[df[column].str.contains(user_text_input)]
235
+ df['keep'] = True
236
+ st.data_editor(
237
+ df,
238
+ column_config={
239
+ "keep": st.column_config.CheckboxColumn(
240
+ help="Select which rows to keep",
241
+ default=False,
242
+ )
243
+ },
244
+ disabled=list(set(df.columns) - {'keep'}),
245
+ hide_index=True,
246
+ )
247
+
248
  return df
249
 
250