Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -317,7 +317,7 @@ with tab5:
|
|
317 |
export_container = st.empty()
|
318 |
|
319 |
with col1:
|
320 |
-
prop_type_var = st.selectbox('Select prop category', options = ['All Props', 'points', 'rebounds', 'assists', 'PRA', 'points+rebounds',
|
321 |
'points+assists', 'rebounds+assists'])
|
322 |
if prop_type_var == 'All Props':
|
323 |
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')
|
@@ -352,6 +352,8 @@ with tab5:
|
|
352 |
df['Median'] = df['Rebounds']
|
353 |
elif prop == 'assists':
|
354 |
df['Median'] = df['Assists']
|
|
|
|
|
355 |
elif prop == 'PRA':
|
356 |
df['Median'] = df['Points'] + df['Rebounds'] + df['Assists']
|
357 |
elif prop == 'points+rebounds':
|
@@ -450,6 +452,16 @@ with tab5:
|
|
450 |
prop_df['Over'] = np.where(prop_df['over_line'] < 0, (-(prop_df['over_line'])/((-(prop_df['over_line']))+101)), 101/(prop_df['over_line']+101))
|
451 |
prop_df['Under'] = np.where(prop_df['under_line'] < 0, (-(prop_df['under_line'])/((-(prop_df['under_line']))+101)), 101/(prop_df['under_line']+101))
|
452 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
453 |
elif prop_type_var == "PRA":
|
454 |
prop_df = prop_frame[['Player', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
455 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'PRA']
|
@@ -505,6 +517,8 @@ with tab5:
|
|
505 |
df['Median'] = df['Rebounds']
|
506 |
elif prop_type_var == 'assists':
|
507 |
df['Median'] = df['Assists']
|
|
|
|
|
508 |
elif prop_type_var == 'PRA':
|
509 |
df['Median'] = df['Points'] + df['Rebounds'] + df['Assists']
|
510 |
elif prop_type_var == 'points+rebounds':
|
|
|
317 |
export_container = st.empty()
|
318 |
|
319 |
with col1:
|
320 |
+
prop_type_var = st.selectbox('Select prop category', options = ['All Props', 'points', 'rebounds', 'assists', 'threes', 'PRA', 'points+rebounds',
|
321 |
'points+assists', 'rebounds+assists'])
|
322 |
if prop_type_var == 'All Props':
|
323 |
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')
|
|
|
352 |
df['Median'] = df['Rebounds']
|
353 |
elif prop == 'assists':
|
354 |
df['Median'] = df['Assists']
|
355 |
+
elif prop == 'threes':
|
356 |
+
df['Median'] = df['3P']
|
357 |
elif prop == 'PRA':
|
358 |
df['Median'] = df['Points'] + df['Rebounds'] + df['Assists']
|
359 |
elif prop == 'points+rebounds':
|
|
|
452 |
prop_df['Over'] = np.where(prop_df['over_line'] < 0, (-(prop_df['over_line'])/((-(prop_df['over_line']))+101)), 101/(prop_df['over_line']+101))
|
453 |
prop_df['Under'] = np.where(prop_df['under_line'] < 0, (-(prop_df['under_line'])/((-(prop_df['under_line']))+101)), 101/(prop_df['under_line']+101))
|
454 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
455 |
+
elif prop_type_var == "threes":
|
456 |
+
prop_df = prop_frame[['Player', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
457 |
+
prop_df = prop_df.loc[prop_df['prop_type'] == 'threes']
|
458 |
+
prop_df = prop_df[['Player', 'over_prop', 'over_line', 'under_line']]
|
459 |
+
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
460 |
+
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
461 |
+
st.table(prop_df)
|
462 |
+
prop_df['Over'] = np.where(prop_df['over_line'] < 0, (-(prop_df['over_line'])/((-(prop_df['over_line']))+101)), 101/(prop_df['over_line']+101))
|
463 |
+
prop_df['Under'] = np.where(prop_df['under_line'] < 0, (-(prop_df['under_line'])/((-(prop_df['under_line']))+101)), 101/(prop_df['under_line']+101))
|
464 |
+
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
465 |
elif prop_type_var == "PRA":
|
466 |
prop_df = prop_frame[['Player', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
467 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'PRA']
|
|
|
517 |
df['Median'] = df['Rebounds']
|
518 |
elif prop_type_var == 'assists':
|
519 |
df['Median'] = df['Assists']
|
520 |
+
elif prop_type_var == 'threes':
|
521 |
+
df['Median'] = df['3P']
|
522 |
elif prop_type_var == 'PRA':
|
523 |
df['Median'] = df['Points'] + df['Rebounds'] + df['Assists']
|
524 |
elif prop_type_var == 'points+rebounds':
|