Spaces:
Running
Running
Fix rank
Browse files
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 |
-
|
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 |
|