pufanyi commited on
Commit
4c839ed
1 Parent(s): dd084c3

Refactor get_leaderboard_df to handle multiple subsets and improve column selection and hiding

Browse files
Files changed (1) hide show
  1. 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.keys())
16
- for subset_name in subsets.keys():
17
- subset_df = subsets[subset_name].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)
 
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)