Spaces:
Running
Running
Refactor get_leaderboard_df to handle multiple subsets and improve column selection and hiding
Browse files- src/populate.py +3 -3
src/populate.py
CHANGED
@@ -12,9 +12,9 @@ from datasets import load_dataset
|
|
12 |
def get_leaderboard_df(results_repo, results_path):
|
13 |
subsets = load_dataset(results_repo, split='all', cache_dir=results_path)
|
14 |
subset_dfs = {}
|
15 |
-
print("Subsets:", subsets
|
16 |
-
for subset_name in subsets.
|
17 |
-
subset_df =
|
18 |
subset_df = subset_df.sort_values(by="Total", ascending=False)
|
19 |
subset_df = subset_df.round(2) # Round all numeric columns to two decimal places
|
20 |
print(subset_df)
|
|
|
12 |
def get_leaderboard_df(results_repo, results_path):
|
13 |
subsets = load_dataset(results_repo, split='all', cache_dir=results_path)
|
14 |
subset_dfs = {}
|
15 |
+
print("Subsets:", subsets)
|
16 |
+
for subset_name, subset_data in subsets.items():
|
17 |
+
subset_df = subset_data.to_pandas()
|
18 |
subset_df = subset_df.sort_values(by="Total", ascending=False)
|
19 |
subset_df = subset_df.round(2) # Round all numeric columns to two decimal places
|
20 |
print(subset_df)
|