Support for multi column filtering using comma seperated values

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