Spaces:
Running
Running
James McCool
commited on
Commit
·
cefcbd9
1
Parent(s):
e867bc9
fixed source of prop frame for agg
Browse files
app.py
CHANGED
@@ -131,8 +131,14 @@ with tab2:
|
|
131 |
team_var5 = st.multiselect('Which teams would you like to include in the tables?', options = prop_trends['Team'].unique(), key='team_var5')
|
132 |
elif split_var5 == 'All':
|
133 |
team_var5 = prop_trends.Team.values.tolist()
|
|
|
|
|
|
|
|
|
|
|
134 |
prop_type_var2 = st.selectbox('Select type of prop are you wanting to view', options = prop_table_options)
|
135 |
prop_frame_disp = prop_trends[prop_trends['Team'].isin(team_var5)]
|
|
|
136 |
prop_frame_disp = prop_frame_disp[prop_frame_disp['prop_type'] == prop_type_var2]
|
137 |
prop_frame_disp = prop_frame_disp.sort_values(by='Trending Over', ascending=False)
|
138 |
st.dataframe(prop_frame_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(prop_format, precision=2), use_container_width = True)
|
@@ -188,7 +194,7 @@ with tab3:
|
|
188 |
if prop_type_var == 'All Props':
|
189 |
|
190 |
if game_select_var == 'Aggregate':
|
191 |
-
prop_df_raw =
|
192 |
sim_vars = ['NHL_GAME_PLAYER_POINTS', 'NHL_GAME_PLAYER_SHOTS_ON_GOAL', 'NHL_GAME_PLAYER_ASSISTS', 'NHL_GAME_PLAYER_BLOCKED_SHOTS']
|
193 |
elif game_select_var == 'Pick6':
|
194 |
prop_df_raw = pick_frame[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
|
|
131 |
team_var5 = st.multiselect('Which teams would you like to include in the tables?', options = prop_trends['Team'].unique(), key='team_var5')
|
132 |
elif split_var5 == 'All':
|
133 |
team_var5 = prop_trends.Team.values.tolist()
|
134 |
+
book_split5 = st.radio("Would you like to view all books or specific ones?", ('All', 'Specific Books'), key='book_split5')
|
135 |
+
if book_split5 == 'Specific Books':
|
136 |
+
book_var5 = st.multiselect('Which books would you like to include in the tables?', options = ['BET_365', 'DRAFTKINGS', 'CONSENSUS', 'FANDUEL', 'MGM', 'UNIBET', 'WILLIAM_HILL'], key='book_var5')
|
137 |
+
elif book_split5 == 'All':
|
138 |
+
book_var5 = ['BET_365', 'DRAFTKINGS', 'CONSENSUS', 'FANDUEL', 'MGM', 'UNIBET', 'WILLIAM_HILL']
|
139 |
prop_type_var2 = st.selectbox('Select type of prop are you wanting to view', options = prop_table_options)
|
140 |
prop_frame_disp = prop_trends[prop_trends['Team'].isin(team_var5)]
|
141 |
+
prop_frame_disp = prop_frame_disp[prop_frame_disp['book'].isin(book_var5)]
|
142 |
prop_frame_disp = prop_frame_disp[prop_frame_disp['prop_type'] == prop_type_var2]
|
143 |
prop_frame_disp = prop_frame_disp.sort_values(by='Trending Over', ascending=False)
|
144 |
st.dataframe(prop_frame_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(prop_format, precision=2), use_container_width = True)
|
|
|
194 |
if prop_type_var == 'All Props':
|
195 |
|
196 |
if game_select_var == 'Aggregate':
|
197 |
+
prop_df_raw = prop_trends[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
198 |
sim_vars = ['NHL_GAME_PLAYER_POINTS', 'NHL_GAME_PLAYER_SHOTS_ON_GOAL', 'NHL_GAME_PLAYER_ASSISTS', 'NHL_GAME_PLAYER_BLOCKED_SHOTS']
|
199 |
elif game_select_var == 'Pick6':
|
200 |
prop_df_raw = pick_frame[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|