DontPlanToEnd
commited on
Commit
•
56376a8
1
Parent(s):
58d6da7
Update app.py
Browse files
app.py
CHANGED
@@ -43,12 +43,12 @@ def update_table(df: pd.DataFrame, query: str, param_ranges: dict) -> pd.DataFra
|
|
43 |
elif param_range == '~70+':
|
44 |
conditions.append((filtered_df['Params'] >= 60))
|
45 |
|
46 |
-
if all(param_ranges.values())
|
47 |
-
conditions.
|
48 |
-
|
49 |
-
|
50 |
else:
|
51 |
-
filtered_df = filtered_df[filtered_df['Params'].isna()
|
52 |
|
53 |
if query:
|
54 |
filtered_df = filtered_df[filtered_df.apply(lambda row: query.lower() in row.to_string().lower(), axis=1)]
|
|
|
43 |
elif param_range == '~70+':
|
44 |
conditions.append((filtered_df['Params'] >= 60))
|
45 |
|
46 |
+
if all(param_ranges.values()):
|
47 |
+
filtered_df = filtered_df[pd.concat(conditions, axis=1).any(axis=1) | filtered_df['Params'].isna()]
|
48 |
+
else:
|
49 |
+
filtered_df = filtered_df[pd.concat(conditions, axis=1).any(axis=1)]
|
50 |
else:
|
51 |
+
filtered_df = filtered_df[filtered_df['Params'].isna()]
|
52 |
|
53 |
if query:
|
54 |
filtered_df = filtered_df[filtered_df.apply(lambda row: query.lower() in row.to_string().lower(), axis=1)]
|