James McCool commited on
Commit
3820d21
·
1 Parent(s): 0e7b119

Update salary calculation in exposure_spread function to reflect accurate adjustments for replacement players, ensuring compliance with salary constraints during exposure evaluations.

Browse files
Files changed (1) hide show
  1. global_func/exposure_spread.py +2 -2
global_func/exposure_spread.py CHANGED
@@ -353,8 +353,8 @@ def exposure_spread(working_frame, exposure_player, exposure_target, exposure_st
353
  row_data = working_frame.iloc[row]
354
  for col in working_frame.columns:
355
  if row_data[col] in comparable_player_list:
356
- print(working_frame.iloc[row]['salary'] + projections_df[projections_df['player_names'] == row_data[col]]['salary'].iloc[0])
357
- if working_frame.iloc[row]['salary'] + projections_df[projections_df['player_names'] == row_data[col]]['salary'].iloc[0] <= salary_max:
358
  print(row_data[col])
359
  # Get the replacement player's positions
360
  replacement_player_positions = projections_df[projections_df['player_names'] == row_data[col]]['position'].iloc[0].split('/')
 
353
  row_data = working_frame.iloc[row]
354
  for col in working_frame.columns:
355
  if row_data[col] in comparable_player_list:
356
+ print(working_frame.iloc[row]['salary'] - projections_df[projections_df['player_names'] == row_data[col]]['salary'].iloc[0] + projections_df[projections_df['player_names'] == exposure_player]['salary'].iloc[0])
357
+ if working_frame.iloc[row]['salary'] - projections_df[projections_df['player_names'] == row_data[col]]['salary'].iloc[0] + projections_df[projections_df['player_names'] == exposure_player]['salary'].iloc[0] <= salary_max:
358
  print(row_data[col])
359
  # Get the replacement player's positions
360
  replacement_player_positions = projections_df[projections_df['player_names'] == row_data[col]]['position'].iloc[0].split('/')