Spaces:
Building
Building
Update leaderboard
Browse files
app.py
CHANGED
@@ -44,8 +44,13 @@ def wrap_model(func):
|
|
44 |
def wrapper(*args, **kwargs):
|
45 |
df = func(*args, **kwargs)
|
46 |
df["Model"] = df["Model"].apply(lambda x: ref_dic[x])
|
47 |
-
cols_to_round = df.select_dtypes(include=[np.number]).columns.tolist()
|
48 |
-
cols_to_round = [col for col in cols_to_round if col != "Model"]
|
|
|
|
|
|
|
|
|
|
|
49 |
df[cols_to_round] = df[cols_to_round].apply(lambda x: np.round(x, 2))
|
50 |
return df
|
51 |
|
|
|
44 |
def wrapper(*args, **kwargs):
|
45 |
df = func(*args, **kwargs)
|
46 |
df["Model"] = df["Model"].apply(lambda x: ref_dic[x])
|
47 |
+
# cols_to_round = df.select_dtypes(include=[np.number]).columns.tolist()
|
48 |
+
# cols_to_round = [col for col in cols_to_round if col != "Model"]
|
49 |
+
# df[cols_to_round] = df[cols_to_round].apply(lambda x: np.round(x, 2))
|
50 |
+
|
51 |
+
all_cols = df.columns.tolist()
|
52 |
+
non_numeric_cols = df.select_dtypes(exclude=[np.number]).columns.tolist()
|
53 |
+
cols_to_round = [col for col in all_cols if col not in non_numeric_cols and col != "Model"]
|
54 |
df[cols_to_round] = df[cols_to_round].apply(lambda x: np.round(x, 2))
|
55 |
return df
|
56 |
|