Spaces:
Runtime error
Runtime error
Commit
·
58c47f7
1
Parent(s):
569c22c
fix column selection
Browse files
app.py
CHANGED
|
@@ -92,12 +92,13 @@ def search_table(df: pd.DataFrame, query: str) -> pd.DataFrame:
|
|
| 92 |
|
| 93 |
|
| 94 |
def select_columns(df: pd.DataFrame, columns: list) -> pd.DataFrame:
|
| 95 |
-
always_here_cols = [
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
]
|
| 99 |
# We use COLS to maintain sorting
|
| 100 |
-
filtered_df = df[always_here_cols + [c for c in COLS if c in df.columns and c in columns]]
|
|
|
|
| 101 |
return filtered_df
|
| 102 |
|
| 103 |
|
|
|
|
| 92 |
|
| 93 |
|
| 94 |
def select_columns(df: pd.DataFrame, columns: list) -> pd.DataFrame:
|
| 95 |
+
# always_here_cols = [
|
| 96 |
+
# AutoEvalColumn.model_type_symbol.name,
|
| 97 |
+
# AutoEvalColumn.model.name,
|
| 98 |
+
# ]
|
| 99 |
# We use COLS to maintain sorting
|
| 100 |
+
# filtered_df = df[always_here_cols + [c for c in COLS if c in df.columns and c in columns]]
|
| 101 |
+
filtered_df = df[[c for c in COLS if c in df.columns and c in columns]]
|
| 102 |
return filtered_df
|
| 103 |
|
| 104 |
|