idolezal commited on
Commit
c3d760a
ยท
1 Parent(s): 7d453b5

Prepare to pandas 3.0

Browse files
Files changed (1) hide show
  1. server.py +5 -5
server.py CHANGED
@@ -479,12 +479,12 @@ class LeaderboardServer:
479
  df_css = x.copy()
480
  for c in df_css:
481
  for i in range(len(df_css.index)):
482
- if x[c].iloc[i] == True or ">true<" in str(x[c].iloc[i]).lower():
483
- df_css[c].iloc[i] = 'background-color: rgba(0, 255, 0, 0.1);'
484
- elif x[c].iloc[i] == False or ">false<" in str(x[c].iloc[i]).lower():
485
- df_css[c].iloc[i] = 'background-color: rgba(255, 0, 0, 0.1);'
486
  else:
487
- df_css[c].iloc[i] = ''
488
  return df_css
489
 
490
  def get_model_tournament_table_csv(self, submission_id, category, pre_submit=None):
 
479
  df_css = x.copy()
480
  for c in df_css:
481
  for i in range(len(df_css.index)):
482
+ if x.loc[i, c] == True or ">true<" in str(x.loc[i, c]).lower():
483
+ df_css.loc[i, c] = 'background-color: rgba(0, 255, 0, 0.1);'
484
+ elif x.loc[i, c] == False or ">false<" in str(x.loc[i, c]).lower():
485
+ df_css.loc[i, c] = 'background-color: rgba(255, 0, 0, 0.1);'
486
  else:
487
+ df_css.loc[i, c] = ''
488
  return df_css
489
 
490
  def get_model_tournament_table_csv(self, submission_id, category, pre_submit=None):