Spaces:
Sleeping
Sleeping
James McCool commited on
Commit ·
76eaa36
1
Parent(s): d665476
Add debug print statements for halfPPR and custom match dictionaries in VORP scoring function to aid in troubleshooting and verification of player evaluations.
Browse files- src/streamlit_app.py +2 -1
src/streamlit_app.py
CHANGED
|
@@ -386,7 +386,6 @@ 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 |
-
|
| 390 |
return pos_des_dict, orig_rank_dict, half_ppr_match_dict, custom_match_dict
|
| 391 |
|
| 392 |
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:
|
|
@@ -441,6 +440,8 @@ def main():
|
|
| 441 |
|
| 442 |
# Calculate VORP and rankings
|
| 443 |
pos_des_dict, orig_rank_dict, half_ppr_match_dict, custom_match_dict = assign_vorp_scoring(position_df, halfPpr_rv, custom_scoring_rv, user_league_settings, user_pos_vorp_limiters)
|
|
|
|
|
|
|
| 444 |
final_df = assign_vorp_roster(position_df, halfPpr_rv, custom_roster_rv, user_pos_vorp_limiters, half_ppr_match_dict, custom_match_dict)
|
| 445 |
final_df = final_df.drop(columns=['SR_ID'], axis=1)
|
| 446 |
final_df['Name_Lookup'] = final_df['Name'].map(orig_rank_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:
|
|
|
|
| 440 |
|
| 441 |
# Calculate VORP and rankings
|
| 442 |
pos_des_dict, orig_rank_dict, half_ppr_match_dict, custom_match_dict = assign_vorp_scoring(position_df, halfPpr_rv, custom_scoring_rv, user_league_settings, user_pos_vorp_limiters)
|
| 443 |
+
print(half_ppr_match_dict)
|
| 444 |
+
print(custom_match_dict)
|
| 445 |
final_df = assign_vorp_roster(position_df, halfPpr_rv, custom_roster_rv, user_pos_vorp_limiters, half_ppr_match_dict, custom_match_dict)
|
| 446 |
final_df = final_df.drop(columns=['SR_ID'], axis=1)
|
| 447 |
final_df['Name_Lookup'] = final_df['Name'].map(orig_rank_dict)
|