James McCool
commited on
Commit
·
bce15f0
1
Parent(s):
3df4bec
Fix indentation issue in player removal logic in distribute_preset.py to ensure proper application of the filtering function. This change improves the accuracy of player exclusion during portfolio distribution.
Browse files
global_func/distribute_preset.py
CHANGED
@@ -57,7 +57,7 @@ def distribute_preset(portfolio: pd.DataFrame, lineup_target: int, exclude_cols:
|
|
57 |
rows_to_drop = []
|
58 |
working_portfolio = portfolio.copy()
|
59 |
remove_mask = working_portfolio[player_columns].apply(
|
60 |
-
lambda row: player_out not in list(row)
|
61 |
)
|
62 |
working_portfolio = working_portfolio[remove_mask]
|
63 |
print(working_portfolio.head(10))
|
|
|
57 |
rows_to_drop = []
|
58 |
working_portfolio = portfolio.copy()
|
59 |
remove_mask = working_portfolio[player_columns].apply(
|
60 |
+
lambda row: player_out not in list(row), axis=1
|
61 |
)
|
62 |
working_portfolio = working_portfolio[remove_mask]
|
63 |
print(working_portfolio.head(10))
|