Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -435,7 +435,7 @@ with tab6:
|
|
435 |
for x in range(0,total_sims):
|
436 |
overall_file[x] = np.random.normal(overall_file['Median'],overall_file['STD'])
|
437 |
|
438 |
-
overall_file=overall_file.drop(['Player', '
|
439 |
|
440 |
players_only = hold_file[['Player']]
|
441 |
|
@@ -591,7 +591,7 @@ with tab6:
|
|
591 |
for x in range(0,total_sims):
|
592 |
overall_file[x] = np.random.normal(overall_file['Median'],overall_file['STD'])
|
593 |
|
594 |
-
overall_file=overall_file.drop(['Player', '
|
595 |
|
596 |
players_only = hold_file[['Player']]
|
597 |
|
@@ -599,32 +599,30 @@ with tab6:
|
|
599 |
|
600 |
prop_check = (overall_file - prop_file)
|
601 |
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
st.table(player_outcomes.head(10))
|
626 |
|
627 |
-
final_outcomes =
|
628 |
|
629 |
final_outcomes = final_outcomes.sort_values(by='Edge', ascending=False)
|
630 |
|
|
|
435 |
for x in range(0,total_sims):
|
436 |
overall_file[x] = np.random.normal(overall_file['Median'],overall_file['STD'])
|
437 |
|
438 |
+
overall_file=overall_file.drop(['Player', 'Prop', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
|
439 |
|
440 |
players_only = hold_file[['Player']]
|
441 |
|
|
|
591 |
for x in range(0,total_sims):
|
592 |
overall_file[x] = np.random.normal(overall_file['Median'],overall_file['STD'])
|
593 |
|
594 |
+
overall_file=overall_file.drop(['Player', 'Prop', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
|
595 |
|
596 |
players_only = hold_file[['Player']]
|
597 |
|
|
|
599 |
|
600 |
prop_check = (overall_file - prop_file)
|
601 |
|
602 |
+
players_only['Mean_Outcome'] = overall_file.mean(axis=1)
|
603 |
+
players_only['10%'] = overall_file.quantile(0.1, axis=1)
|
604 |
+
players_only['90%'] = overall_file.quantile(0.9, axis=1)
|
605 |
+
players_only['Over'] = prop_check[prop_check > 0].count(axis=1)/float(total_sims)
|
606 |
+
players_only['Imp Over'] = players_only['Player'].map(over_dict)
|
607 |
+
players_only['Over%'] = players_only[["Over", "Imp Over"]].mean(axis=1)
|
608 |
+
players_only['Under'] = prop_check[prop_check < 0].count(axis=1)/float(total_sims)
|
609 |
+
players_only['Imp Under'] = players_only['Player'].map(under_dict)
|
610 |
+
players_only['Under%'] = players_only[["Under", "Imp Under"]].mean(axis=1)
|
611 |
+
players_only['Prop'] = players_only['Player'].map(prop_dict)
|
612 |
+
players_only['Prop_avg'] = players_only['Prop'].mean() / 100
|
613 |
+
players_only['prop_threshold'] = .10
|
614 |
+
players_only = players_only.loc[players_only['Mean_Outcome'] > 0]
|
615 |
+
players_only['Over_diff'] = players_only['Over%'] - players_only['Imp Over']
|
616 |
+
players_only['Under_diff'] = players_only['Under%'] - players_only['Imp Under']
|
617 |
+
players_only['Bet_check'] = np.where(players_only['Over_diff'] > players_only['Under_diff'], players_only['Over_diff'] , players_only['Under_diff'])
|
618 |
+
players_only['Bet_suggest'] = np.where(players_only['Over_diff'] > players_only['Under_diff'], "Over" , "Under")
|
619 |
+
players_only['Bet?'] = np.where(players_only['Bet_check'] >= players_only['prop_threshold'], players_only['Bet_suggest'], "No Bet")
|
620 |
+
players_only['Edge'] = players_only['Bet_check']
|
621 |
|
622 |
+
players_only['Player'] = hold_file[['Player']]
|
623 |
+
players_only['Team'] = players_only['Player'].map(team_dict)
|
|
|
|
|
624 |
|
625 |
+
final_outcomes = players_only[['Player', 'Team', 'book', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge']]
|
626 |
|
627 |
final_outcomes = final_outcomes.sort_values(by='Edge', ascending=False)
|
628 |
|