Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -311,13 +311,15 @@ with tab5:
|
|
311 |
export_container = st.empty()
|
312 |
|
313 |
with col1:
|
314 |
-
prop_type_var = st.selectbox('Select prop category', options = ['points', 'rebounds', 'assists', 'PRA', 'points+rebounds',
|
315 |
-
|
|
|
|
|
316 |
|
317 |
if st.button('Simulate Prop Category'):
|
318 |
with col2:
|
319 |
with df_hold_container.container():
|
320 |
-
if prop_type_var == '
|
321 |
for prop in all_sim_vars:
|
322 |
|
323 |
prop_df = prop_frame[['Player', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
@@ -334,7 +336,7 @@ with tab5:
|
|
334 |
over_dict = dict(zip(df.Player, df.Over))
|
335 |
under_dict = dict(zip(df.Player, df.Under))
|
336 |
|
337 |
-
total_sims =
|
338 |
|
339 |
df.replace("", 0, inplace=True)
|
340 |
|
@@ -411,7 +413,7 @@ with tab5:
|
|
411 |
|
412 |
final_outcomes = sim_all_hold
|
413 |
|
414 |
-
elif prop_type_var != '
|
415 |
if prop_type_var == "points":
|
416 |
prop_df = prop_frame[['Player', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
417 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'points']
|
@@ -559,6 +561,7 @@ with tab5:
|
|
559 |
|
560 |
final_outcomes = players_only[['Player', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge']]
|
561 |
|
|
|
562 |
final_outcomes = final_outcomes.sort_values(by='Edge', ascending=False)
|
563 |
|
564 |
with df_hold_container:
|
|
|
311 |
export_container = st.empty()
|
312 |
|
313 |
with col1:
|
314 |
+
prop_type_var = st.selectbox('Select prop category', options = ['All Props', 'points', 'rebounds', 'assists', 'PRA', 'points+rebounds',
|
315 |
+
'points+assists', 'rebounds+assists'])
|
316 |
+
if prop_type_var == 'All Props':
|
317 |
+
st.info('please note that the All Props run can take some time, you will see progress as tables show up in the sim area to the right')
|
318 |
|
319 |
if st.button('Simulate Prop Category'):
|
320 |
with col2:
|
321 |
with df_hold_container.container():
|
322 |
+
if prop_type_var == 'All Props':
|
323 |
for prop in all_sim_vars:
|
324 |
|
325 |
prop_df = prop_frame[['Player', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
|
|
336 |
over_dict = dict(zip(df.Player, df.Over))
|
337 |
under_dict = dict(zip(df.Player, df.Under))
|
338 |
|
339 |
+
total_sims = 5000
|
340 |
|
341 |
df.replace("", 0, inplace=True)
|
342 |
|
|
|
413 |
|
414 |
final_outcomes = sim_all_hold
|
415 |
|
416 |
+
elif prop_type_var != 'All Props':
|
417 |
if prop_type_var == "points":
|
418 |
prop_df = prop_frame[['Player', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
419 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'points']
|
|
|
561 |
|
562 |
final_outcomes = players_only[['Player', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge']]
|
563 |
|
564 |
+
final_outcomes = final_outcomes[final_outcomes['Prop'] > 0]
|
565 |
final_outcomes = final_outcomes.sort_values(by='Edge', ascending=False)
|
566 |
|
567 |
with df_hold_container:
|