CoreyMorris imdatta0 commited on
Commit
246a992
1 Parent(s): b601bef

Support for multi column filtering using comma seperated values (#2)

Browse files

- Support for multi column filtering using comma seperated values (135f2a98a62646f853b3bd5dae0a26b91801202c)


Co-authored-by: Dattu Sharma <[email protected]>

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -180,10 +180,10 @@ if search_query:
180
 
181
 
182
  # Search box for columns
183
- column_search_query = st.text_input("Filter by Column/Task Name:", "")
184
 
185
  # Get the columns that contain the search query
186
- matching_columns = [col for col in filtered_data.columns if column_search_query.lower() in col.lower()]
187
 
188
  # Display the DataFrame with only the matching columns
189
  st.markdown("## Sortable Results")
 
180
 
181
 
182
  # Search box for columns
183
+ column_search_query = st.text_input("Filter by Column/Task Name:", "").split(',')
184
 
185
  # Get the columns that contain the search query
186
+ matching_columns = [col for col in filtered_data.columns if any(query.lower() in col.lower() for query in column_search_query)]
187
 
188
  # Display the DataFrame with only the matching columns
189
  st.markdown("## Sortable Results")