James McCool
commited on
Commit
·
8a5b292
1
Parent(s):
f9fb038
Add debug print statements in exposure_spread function to log player rows and working frame, enhancing troubleshooting capabilities during player replacement process.
Browse files
global_func/exposure_spread.py
CHANGED
|
@@ -37,6 +37,8 @@ def exposure_spread(working_frame, exposure_player, exposure_target, exposure_st
|
|
| 37 |
|
| 38 |
# isolate the rows that contain the player
|
| 39 |
player_rows = working_frame[player_mask]
|
|
|
|
|
|
|
| 40 |
|
| 41 |
# for each row to the the number of lineups to remove, replace with random choice from comparable player list
|
| 42 |
for change in range(math.ceil(lineups_to_remove)):
|
|
@@ -44,7 +46,6 @@ def exposure_spread(working_frame, exposure_player, exposure_target, exposure_st
|
|
| 44 |
insert_player = random.choice(comparable_player_list)
|
| 45 |
player_location = list(working_frame.iloc[row]).index(exposure_player)
|
| 46 |
working_frame.at[row, player_location] = insert_player
|
| 47 |
-
print(working_frame.at[row, player_location])
|
| 48 |
|
| 49 |
return working_frame
|
| 50 |
|
|
|
|
| 37 |
|
| 38 |
# isolate the rows that contain the player
|
| 39 |
player_rows = working_frame[player_mask]
|
| 40 |
+
print(player_rows.head(10))
|
| 41 |
+
print(working_frame.head(10))
|
| 42 |
|
| 43 |
# for each row to the the number of lineups to remove, replace with random choice from comparable player list
|
| 44 |
for change in range(math.ceil(lineups_to_remove)):
|
|
|
|
| 46 |
insert_player = random.choice(comparable_player_list)
|
| 47 |
player_location = list(working_frame.iloc[row]).index(exposure_player)
|
| 48 |
working_frame.at[row, player_location] = insert_player
|
|
|
|
| 49 |
|
| 50 |
return working_frame
|
| 51 |
|