rodrigomasini commited on
Commit
7f94e46
1 Parent(s): 8466c94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -755,6 +755,14 @@ def get_mteb_average():
755
  # Start ranking from 1
756
  DATA_OVERALL.insert(0, "Rank", list(range(1, len(DATA_OVERALL) + 1)))
757
 
 
 
 
 
 
 
 
 
758
  DATA_OVERALL = DATA_OVERALL.round(2)
759
 
760
  # Fill NaN after averaging
 
755
  # Start ranking from 1
756
  DATA_OVERALL.insert(0, "Rank", list(range(1, len(DATA_OVERALL) + 1)))
757
 
758
+ # For columns you know are numeric:
759
+ numeric_columns = DATA_OVERALL.select_dtypes(include=['float64', 'int64']).columns
760
+ DATA_OVERALL[numeric_columns] = DATA_OVERALL[numeric_columns].fillna(np.nan) # Or a placeholder like 0 or -1
761
+
762
+ # For columns expected to be strings, filling with an empty string is fine:
763
+ string_columns = DATA_OVERALL.select_dtypes(include=['object']).columns
764
+ DATA_OVERALL[string_columns] = DATA_OVERALL[string_columns].fillna('')
765
+
766
  DATA_OVERALL = DATA_OVERALL.round(2)
767
 
768
  # Fill NaN after averaging