Multichem commited on
Commit
5e6744b
·
verified ·
1 Parent(s): 0532163

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -396,6 +396,7 @@ with tab6:
396
  df = pd.merge(overall_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
397
 
398
  prop_dict = dict(zip(df.Player, df.Prop))
 
399
  over_dict = dict(zip(df.Player, df.Over))
400
  under_dict = dict(zip(df.Player, df.Under))
401
 
@@ -453,6 +454,7 @@ with tab6:
453
  players_only['Imp Under'] = players_only['Player'].map(under_dict)
454
  players_only['Under%'] = players_only[["Under", "Imp Under"]].mean(axis=1)
455
  players_only['Prop'] = players_only['Player'].map(prop_dict)
 
456
  players_only['Prop_avg'] = players_only['Prop'].mean() / 100
457
  players_only['prop_threshold'] = .10
458
  players_only = players_only.loc[players_only['Mean_Outcome'] > 0]
@@ -467,7 +469,7 @@ with tab6:
467
  players_only['Player'] = hold_file[['Player']]
468
  players_only['Team'] = players_only['Player'].map(team_dict)
469
 
470
- leg_outcomes = players_only[['Player', 'Team', 'book', 'Prop type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge']]
471
  sim_all_hold = pd.concat([sim_all_hold, leg_outcomes], ignore_index=True)
472
 
473
  final_outcomes = sim_all_hold
@@ -552,6 +554,7 @@ with tab6:
552
  df = pd.merge(overall_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
553
 
554
  prop_dict = dict(zip(df.Player, df.Prop))
 
555
  over_dict = dict(zip(df.Player, df.Over))
556
  under_dict = dict(zip(df.Player, df.Under))
557
 
@@ -591,7 +594,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', 'Prop', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
595
 
596
  players_only = hold_file[['Player']]
597
 
@@ -608,6 +611,7 @@ with tab6:
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
@@ -622,7 +626,7 @@ with tab6:
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
 
 
396
  df = pd.merge(overall_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
397
 
398
  prop_dict = dict(zip(df.Player, df.Prop))
399
+ book_dict = dict(zip(df.Player, df.book))
400
  over_dict = dict(zip(df.Player, df.Over))
401
  under_dict = dict(zip(df.Player, df.Under))
402
 
 
454
  players_only['Imp Under'] = players_only['Player'].map(under_dict)
455
  players_only['Under%'] = players_only[["Under", "Imp Under"]].mean(axis=1)
456
  players_only['Prop'] = players_only['Player'].map(prop_dict)
457
+ players_only['Book'] = players_only['Player'].map(book_dict)
458
  players_only['Prop_avg'] = players_only['Prop'].mean() / 100
459
  players_only['prop_threshold'] = .10
460
  players_only = players_only.loc[players_only['Mean_Outcome'] > 0]
 
469
  players_only['Player'] = hold_file[['Player']]
470
  players_only['Team'] = players_only['Player'].map(team_dict)
471
 
472
+ leg_outcomes = players_only[['Player', 'Team', 'Book', 'Prop type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge']]
473
  sim_all_hold = pd.concat([sim_all_hold, leg_outcomes], ignore_index=True)
474
 
475
  final_outcomes = sim_all_hold
 
554
  df = pd.merge(overall_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
555
 
556
  prop_dict = dict(zip(df.Player, df.Prop))
557
+ book_dict = dict(zip(df.Player, df.book))
558
  over_dict = dict(zip(df.Player, df.Over))
559
  under_dict = dict(zip(df.Player, df.Under))
560
 
 
594
  for x in range(0,total_sims):
595
  overall_file[x] = np.random.normal(overall_file['Median'],overall_file['STD'])
596
 
597
+ overall_file=overall_file.drop(['Player', 'book', 'Prop', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
598
 
599
  players_only = hold_file[['Player']]
600
 
 
611
  players_only['Under'] = prop_check[prop_check < 0].count(axis=1)/float(total_sims)
612
  players_only['Imp Under'] = players_only['Player'].map(under_dict)
613
  players_only['Under%'] = players_only[["Under", "Imp Under"]].mean(axis=1)
614
+ players_only['Book'] = players_only['Player'].map(book_dict)
615
  players_only['Prop'] = players_only['Player'].map(prop_dict)
616
  players_only['Prop_avg'] = players_only['Prop'].mean() / 100
617
  players_only['prop_threshold'] = .10
 
626
  players_only['Player'] = hold_file[['Player']]
627
  players_only['Team'] = players_only['Player'].map(team_dict)
628
 
629
+ final_outcomes = players_only[['Player', 'Team', 'Book', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge']]
630
 
631
  final_outcomes = final_outcomes.sort_values(by='Edge', ascending=False)
632