Multichem commited on
Commit
0532163
·
verified ·
1 Parent(s): 53cb0c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -26
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', 'book', 'Prop', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
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', 'book', 'Prop', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
595
 
596
  players_only = hold_file[['Player']]
597
 
@@ -599,32 +599,30 @@ with tab6:
599
 
600
  prop_check = (overall_file - prop_file)
601
 
602
- player_outcomes['Mean_Outcome'] = overall_file.mean(axis=1)
603
- player_outcomes['10%'] = overall_file.quantile(0.1, axis=1)
604
- player_outcomes['90%'] = overall_file.quantile(0.9, axis=1)
605
- player_outcomes['Over'] = prop_check[prop_check > 0].count(axis=1)/float(total_sims)
606
- player_outcomes['Imp Over'] = player_outcomes['Player'].map(over_dict)
607
- player_outcomes['Over%'] = player_outcomes[["Over", "Imp Over"]].mean(axis=1)
608
- player_outcomes['Under'] = prop_check[prop_check < 0].count(axis=1)/float(total_sims)
609
- player_outcomes['Imp Under'] = player_outcomes['Player'].map(under_dict)
610
- player_outcomes['Under%'] = player_outcomes[["Under", "Imp Under"]].mean(axis=1)
611
- player_outcomes['Prop'] = player_outcomes['Player'].map(prop_dict)
612
- player_outcomes['Prop_avg'] = player_outcomes['Prop'].mean() / 100
613
- player_outcomes['prop_threshold'] = .10
614
- player_outcomes = player_outcomes.loc[player_outcomes['Mean_Outcome'] > 0]
615
- player_outcomes['Over_diff'] = player_outcomes['Over%'] - player_outcomes['Imp Over']
616
- player_outcomes['Under_diff'] = player_outcomes['Under%'] - player_outcomes['Imp Under']
617
- player_outcomes['Bet_check'] = np.where(player_outcomes['Over_diff'] > player_outcomes['Under_diff'], player_outcomes['Over_diff'] , player_outcomes['Under_diff'])
618
- player_outcomes['Bet_suggest'] = np.where(player_outcomes['Over_diff'] > player_outcomes['Under_diff'], "Over" , "Under")
619
- player_outcomes['Bet?'] = np.where(player_outcomes['Bet_check'] >= player_outcomes['prop_threshold'], player_outcomes['Bet_suggest'], "No Bet")
620
- player_outcomes['Edge'] = player_outcomes['Bet_check']
621
 
622
- player_outcomes['Player'] = hold_file[['Player']]
623
- player_outcomes['Team'] = players_only['Player'].map(team_dict)
624
-
625
- st.table(player_outcomes.head(10))
626
 
627
- final_outcomes = player_outcomes[['Player', 'Team', 'book', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge']]
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