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

Add debug print statement for lineups_to_remove in exposure_spread function to assist in tracking player removal logic during exposure calculations.

Browse files
Files changed (1) hide show
  1. global_func/exposure_spread.py +4 -3
global_func/exposure_spread.py CHANGED
@@ -342,16 +342,17 @@ def exposure_spread(working_frame, exposure_player, exposure_target, exposure_st
342
  # comparable_players = comparable_players[~comparable_players['player_names'].isin(existing_players)]
343
 
344
  # Create a list of comparable players
 
345
  comparable_player_list = comparable_players['player_names'].tolist()
346
  print(comparable_player_list)
347
  if comparable_player_list:
348
- replace_player = random.choice(comparable_player_list)
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] == replace_player:
 
353
  # Get the replacement player's positions
354
- replacement_player_positions = projections_df[projections_df['player_names'] == replace_player]['position'].iloc[0].split('/')
355
 
356
  # Check if the replacement player is eligible for this column
357
  if type_var == 'Classic':
 
342
  # comparable_players = comparable_players[~comparable_players['player_names'].isin(existing_players)]
343
 
344
  # Create a list of comparable players
345
+ print(lineups_to_remove)
346
  comparable_player_list = comparable_players['player_names'].tolist()
347
  print(comparable_player_list)
348
  if comparable_player_list:
 
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('/')
356
 
357
  # Check if the replacement player is eligible for this column
358
  if type_var == 'Classic':