James McCool
commited on
Commit
·
33beedc
1
Parent(s):
10c821a
Update sorting criteria in hedging_preset.py to use 'ownership' instead of 'Own'. This change improves the accuracy of player selection by aligning with the updated data structure.
Browse files
global_func/hedging_preset.py
CHANGED
@@ -8,7 +8,7 @@ def hedging_preset(portfolio: pd.DataFrame, lineup_target: int, projections_file
|
|
8 |
excluded_cols = ['salary', 'median', 'Own', 'Finish_percentile', 'Dupes', 'Stack', 'Size', 'Win%', 'Lineup Edge', 'Weighted Own', 'Geomean', 'Similarity Score']
|
9 |
|
10 |
check_own_df = projections_file.copy()
|
11 |
-
check_own_df = check_own_df.sort_values(by='
|
12 |
top_owned = check_own_df['player_names'].head(3).tolist()
|
13 |
|
14 |
concat_portfolio = pd.DataFrame(columns=portfolio.columns)
|
|
|
8 |
excluded_cols = ['salary', 'median', 'Own', 'Finish_percentile', 'Dupes', 'Stack', 'Size', 'Win%', 'Lineup Edge', 'Weighted Own', 'Geomean', 'Similarity Score']
|
9 |
|
10 |
check_own_df = projections_file.copy()
|
11 |
+
check_own_df = check_own_df.sort_values(by='ownership', ascending=False)
|
12 |
top_owned = check_own_df['player_names'].head(3).tolist()
|
13 |
|
14 |
concat_portfolio = pd.DataFrame(columns=portfolio.columns)
|