Spaces:
Running
Running
zhouxiangxin1998
commited on
Commit
•
88dde12
1
Parent(s):
53eed69
update tag
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def assign_rank_and_get_sorted_csv(src_csv_path, tag_csv_path, ignore_num=0):
|
|
64 |
continue
|
65 |
float_csv[col] *= tag
|
66 |
float_csv[col] = float_csv[col].fillna(value=1e12)
|
67 |
-
rank_csv[col] = float_csv[col].rank(method='min')
|
68 |
rank_csv['__sum_of_ranks'] = rank_csv.sum(axis=1)
|
69 |
src_csv.insert(loc=0, column='Rank', value=-1 * np.ones(len(src_csv)))
|
70 |
src_csv.loc[list(range(ignore_num, len(src_csv))), 'Rank'] = rank_csv['__sum_of_ranks'].rank(method='min')
|
|
|
64 |
continue
|
65 |
float_csv[col] *= tag
|
66 |
float_csv[col] = float_csv[col].fillna(value=1e12)
|
67 |
+
rank_csv[col] = float_csv[col].rank(method='min') * abs(tag)
|
68 |
rank_csv['__sum_of_ranks'] = rank_csv.sum(axis=1)
|
69 |
src_csv.insert(loc=0, column='Rank', value=-1 * np.ones(len(src_csv)))
|
70 |
src_csv.loc[list(range(ignore_num, len(src_csv))), 'Rank'] = rank_csv['__sum_of_ranks'].rank(method='min')
|