James McCool commited on
Commit
bce8275
·
1 Parent(s): 7f4d26e

Fix comparison logic in exposure_spread function by replacing isin() with direct membership check for comparable_player_list, improving clarity and performance in player selection.

Browse files
Files changed (1) hide show
  1. global_func/exposure_spread.py +1 -1
global_func/exposure_spread.py CHANGED
@@ -349,7 +349,7 @@ def exposure_spread(working_frame, exposure_player, exposure_target, exposure_st
349
  # Find which column contains the exposure_player
350
  row_data = working_frame.iloc[row]
351
  for col in working_frame.columns:
352
- if row_data[col].isin(comparable_player_list):
353
  print(row_data[col])
354
  # Get the replacement player's positions
355
  replacement_player_positions = projections_df[projections_df['player_names'] == row_data[col]]['position'].iloc[0].split('/')
 
349
  # Find which column contains the exposure_player
350
  row_data = working_frame.iloc[row]
351
  for col in working_frame.columns:
352
+ if row_data[col] in comparable_player_list:
353
  print(row_data[col])
354
  # Get the replacement player's positions
355
  replacement_player_positions = projections_df[projections_df['player_names'] == row_data[col]]['position'].iloc[0].split('/')