Spaces:
Runtime error
Runtime error
chore: Round numeric columns to two decimal places in get_leaderboard_df
Browse files- src/populate.py +1 -0
src/populate.py
CHANGED
|
@@ -13,5 +13,6 @@ def get_leaderboard_df(results_repo, results_path, dataset_version):
|
|
| 13 |
hf_leaderboard = load_dataset(results_repo, dataset_version, split="test", cache_dir=results_path)
|
| 14 |
df = hf_leaderboard.to_pandas()
|
| 15 |
df = df.sort_values(by="Total", ascending=False)
|
|
|
|
| 16 |
print(df)
|
| 17 |
return df
|
|
|
|
| 13 |
hf_leaderboard = load_dataset(results_repo, dataset_version, split="test", cache_dir=results_path)
|
| 14 |
df = hf_leaderboard.to_pandas()
|
| 15 |
df = df.sort_values(by="Total", ascending=False)
|
| 16 |
+
df = df.round(2) # Round all numeric columns to two decimal places
|
| 17 |
print(df)
|
| 18 |
return df
|