Spaces:
Sleeping
Sleeping
James McCool
commited on
Commit
·
8ba448c
1
Parent(s):
5857274
Add debug print statements in VORP scoring function to display player evaluations for each position, aiding in verification and troubleshooting of calculations.
Browse files- src/streamlit_app.py +5 -0
src/streamlit_app.py
CHANGED
@@ -370,6 +370,8 @@ def assign_vorp_scoring(frame: pd.DataFrame, halfPpr_rv: dict, custom_rv: dict,
|
|
370 |
pos_frame['custom_rv'] = custom_rv[positions]
|
371 |
pos_frame['halfPpr_VORP'] = pos_frame['halfPpr'] - halfPpr_rv[positions]
|
372 |
pos_frame['custom_VORP'] = pos_frame[rv_type] - custom_rv[positions]
|
|
|
|
|
373 |
|
374 |
vorp_frame = pd.concat([vorp_frame, pos_frame]).reset_index(drop=True)
|
375 |
|
@@ -386,6 +388,9 @@ def assign_vorp_scoring(frame: pd.DataFrame, halfPpr_rv: dict, custom_rv: dict,
|
|
386 |
half_ppr_match_dict = dict(zip(vorp_frame['pos_designation'], vorp_frame['halfPpr']))
|
387 |
custom_match_dict = dict(zip(vorp_frame['pos_designation'], vorp_frame[rv_type]))
|
388 |
|
|
|
|
|
|
|
389 |
return pos_des_dict, orig_rank_dict, half_ppr_match_dict, custom_match_dict
|
390 |
|
391 |
def assign_vorp_roster(frame: pd.DataFrame, halfPpr_rv: dict, custom_rv: dict, pos_vorp_limiters: dict, half_ppr_match_dict: dict, custom_match_dict: dict) -> pd.DataFrame:
|
|
|
370 |
pos_frame['custom_rv'] = custom_rv[positions]
|
371 |
pos_frame['halfPpr_VORP'] = pos_frame['halfPpr'] - halfPpr_rv[positions]
|
372 |
pos_frame['custom_VORP'] = pos_frame[rv_type] - custom_rv[positions]
|
373 |
+
|
374 |
+
print(pos_frame[['Name', 'halfPpr', 'custom_rv', 'halfPpr_VORP', 'custom_VORP']].head(20))
|
375 |
|
376 |
vorp_frame = pd.concat([vorp_frame, pos_frame]).reset_index(drop=True)
|
377 |
|
|
|
388 |
half_ppr_match_dict = dict(zip(vorp_frame['pos_designation'], vorp_frame['halfPpr']))
|
389 |
custom_match_dict = dict(zip(vorp_frame['pos_designation'], vorp_frame[rv_type]))
|
390 |
|
391 |
+
for pos in ['QB', 'RB', 'WR', 'TE']:
|
392 |
+
print(vorp_frame[vorp_frame['Pos'] == pos].head(20))
|
393 |
+
|
394 |
return pos_des_dict, orig_rank_dict, half_ppr_match_dict, custom_match_dict
|
395 |
|
396 |
def assign_vorp_roster(frame: pd.DataFrame, halfPpr_rv: dict, custom_rv: dict, pos_vorp_limiters: dict, half_ppr_match_dict: dict, custom_match_dict: dict) -> pd.DataFrame:
|