Spaces:
Running
Running
James McCool
commited on
Commit
·
8dedc8e
1
Parent(s):
e25cbc1
Refactor app.py to standardize DataFrame column names for leg_outcomes. Changed 'Imp Over' and 'Imp Under' to 'Over' and 'Under' respectively, enhancing clarity and consistency in prop data handling.
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ prop_format = {'L5 Success': '{:.2%}', 'L10_Success': '{:.2%}', 'L20_success': '
|
|
60 |
'Implied Over': '{:.2%}', 'Implied Under': '{:.2%}', 'Over Edge': '{:.2%}', 'Under Edge': '{:.2%}'}
|
61 |
all_sim_vars = ['NHL_GAME_PLAYER_SHOTS_ON_GOAL', 'NHL_GAME_PLAYER_POINTS', 'NHL_GAME_PLAYER_SHOTS_BLOCKED', 'NHL_GAME_PLAYER_ASSISTS']
|
62 |
pick6_sim_vars = ['Points', 'Shots on Goal', 'Assists', 'Blocks']
|
63 |
-
sim_all_hold = pd.DataFrame(columns=['Player', 'Prop Type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Trending Over', 'Over%', 'Imp Under', 'Trending Under', 'Under%', 'Bet?', 'Edge'])
|
64 |
|
65 |
@st.cache_resource(ttl=200)
|
66 |
def pull_baselines():
|
@@ -311,7 +311,7 @@ with tab3:
|
|
311 |
players_only['Player'] = hold_file[['Player']]
|
312 |
players_only['Team'] = players_only['Player'].map(team_dict)
|
313 |
|
314 |
-
leg_outcomes = players_only[['Player', 'Team', 'Book', 'Prop Type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Trending Over', 'Over%', 'Imp Under', 'Trending Under', 'Under%', 'Bet?', 'Edge']]
|
315 |
sim_all_hold = pd.concat([sim_all_hold, leg_outcomes], ignore_index=True)
|
316 |
|
317 |
final_outcomes = sim_all_hold
|
@@ -439,7 +439,7 @@ with tab3:
|
|
439 |
players_only['Player'] = hold_file[['Player']]
|
440 |
players_only['Team'] = players_only['Player'].map(team_dict)
|
441 |
|
442 |
-
leg_outcomes = players_only[['Player', 'Team', 'Book', 'Prop', 'Prop Type', 'Mean_Outcome', 'Imp Over', 'Trending Over', 'Over%', 'Imp Under', 'Trending Under', 'Under%', 'Bet?', 'Edge']]
|
443 |
sim_all_hold = pd.concat([sim_all_hold, leg_outcomes], ignore_index=True)
|
444 |
|
445 |
final_outcomes = sim_all_hold
|
|
|
60 |
'Implied Over': '{:.2%}', 'Implied Under': '{:.2%}', 'Over Edge': '{:.2%}', 'Under Edge': '{:.2%}'}
|
61 |
all_sim_vars = ['NHL_GAME_PLAYER_SHOTS_ON_GOAL', 'NHL_GAME_PLAYER_POINTS', 'NHL_GAME_PLAYER_SHOTS_BLOCKED', 'NHL_GAME_PLAYER_ASSISTS']
|
62 |
pick6_sim_vars = ['Points', 'Shots on Goal', 'Assists', 'Blocks']
|
63 |
+
sim_all_hold = pd.DataFrame(columns=['Player', 'Prop Type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over', 'Trending Over', 'Over%', 'Imp Under', 'Under', 'Trending Under', 'Under%', 'Bet?', 'Edge'])
|
64 |
|
65 |
@st.cache_resource(ttl=200)
|
66 |
def pull_baselines():
|
|
|
311 |
players_only['Player'] = hold_file[['Player']]
|
312 |
players_only['Team'] = players_only['Player'].map(team_dict)
|
313 |
|
314 |
+
leg_outcomes = players_only[['Player', 'Team', 'Book', 'Prop Type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over', 'Trending Over', 'Over%', 'Imp Under', 'Under', 'Trending Under', 'Under%', 'Bet?', 'Edge']]
|
315 |
sim_all_hold = pd.concat([sim_all_hold, leg_outcomes], ignore_index=True)
|
316 |
|
317 |
final_outcomes = sim_all_hold
|
|
|
439 |
players_only['Player'] = hold_file[['Player']]
|
440 |
players_only['Team'] = players_only['Player'].map(team_dict)
|
441 |
|
442 |
+
leg_outcomes = players_only[['Player', 'Team', 'Book', 'Prop', 'Prop Type', 'Mean_Outcome', 'Imp Over', 'Over', 'Trending Over', 'Over%', 'Imp Under', 'Under', 'Trending Under', 'Under%', 'Bet?', 'Edge']]
|
443 |
sim_all_hold = pd.concat([sim_all_hold, leg_outcomes], ignore_index=True)
|
444 |
|
445 |
final_outcomes = sim_all_hold
|