James McCool
commited on
Commit
·
dbc0343
1
Parent(s):
bce15f0
Update sorting order in distribute_preset.py to prioritize players with the highest median values. This change enhances the accuracy of the portfolio distribution process by ensuring that the top players are selected based on their performance metrics.
Browse files
global_func/distribute_preset.py
CHANGED
@@ -74,6 +74,6 @@ def distribute_preset(portfolio: pd.DataFrame, lineup_target: int, exclude_cols:
|
|
74 |
concat_portfolio = pd.concat([concat_portfolio, working_portfolio])
|
75 |
|
76 |
if len(concat_portfolio) >= lineup_target:
|
77 |
-
return concat_portfolio.sort_values(by='median', ascending=
|
78 |
|
79 |
-
return concat_portfolio.sort_values(by='median', ascending=
|
|
|
74 |
concat_portfolio = pd.concat([concat_portfolio, working_portfolio])
|
75 |
|
76 |
if len(concat_portfolio) >= lineup_target:
|
77 |
+
return concat_portfolio.sort_values(by='median', ascending=False).head(lineup_target)
|
78 |
|
79 |
+
return concat_portfolio.sort_values(by='median', ascending=False)
|