Slep commited on
Commit
8beafb8
·
1 Parent(s): 495ed17
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -139,9 +139,8 @@ def filter_dataframe(df, k_filter, d_filter, c_filter):
139
  def add_rank(df):
140
  main_metrics = df["R@1 +1M Dist."].str.split("±").str[0].astype(float)
141
 
142
- # Argsort is smallest to largest so we reverse it
143
- # We add 1 to start the rank at 1 instead of 0
144
- df["Rank"] = main_metrics.argsort().values[::-1] + 1
145
  return df
146
 
147
 
 
139
  def add_rank(df):
140
  main_metrics = df["R@1 +1M Dist."].str.split("±").str[0].astype(float)
141
 
142
+ # Argsort is from smallest to largest so we reverse it
143
+ df["Rank"] = df.shape[0] - main_metrics.argsort()
 
144
  return df
145
 
146