Spaces:
Running
Running
James McCool
commited on
Commit
•
fd6e941
1
Parent(s):
5b60329
adjusted some pick6 objects and variables
Browse files
app.py
CHANGED
@@ -439,21 +439,21 @@ with tab5:
|
|
439 |
|
440 |
df.replace("", 0, inplace=True)
|
441 |
|
442 |
-
if prop == "NBA_GAME_PLAYER_POINTS":
|
443 |
df['Median'] = df['Points']
|
444 |
-
elif prop == "NBA_GAME_PLAYER_REBOUNDS":
|
445 |
df['Median'] = df['Rebounds']
|
446 |
-
elif prop == "NBA_GAME_PLAYER_ASSISTS":
|
447 |
df['Median'] = df['Assists']
|
448 |
-
elif prop == "NBA_GAME_PLAYER_3_POINTERS_MADE":
|
449 |
df['Median'] = df['3P']
|
450 |
-
elif prop == "NBA_GAME_PLAYER_POINTS_REBOUNDS_ASSISTS":
|
451 |
df['Median'] = df['PRA']
|
452 |
-
elif prop == "NBA_GAME_PLAYER_POINTS_REBOUNDS":
|
453 |
df['Median'] = df['Points'] + df['Rebounds']
|
454 |
-
elif prop == "NBA_GAME_PLAYER_POINTS_ASSISTS":
|
455 |
df['Median'] = df['Points'] + df['Assists']
|
456 |
-
elif prop == "NBA_GAME_PLAYER_REBOUNDS_ASSISTS":
|
457 |
df['Median'] = df['Rebounds'] + df['Assists']
|
458 |
|
459 |
flex_file = df
|
@@ -520,14 +520,15 @@ with tab5:
|
|
520 |
prop_df_raw = prop_frame[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
521 |
elif game_select_var == 'Pick6':
|
522 |
prop_df_raw = pick_frame[['Full_name', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
523 |
-
prop_df_raw.rename(columns={"Full_name": "Player"}, inplace = True)
|
524 |
|
525 |
for books in ['FANDUEL', 'DRAFTKINGS', 'BET365', 'CONSENSUS']:
|
526 |
if game_select_var == 'Pick6':
|
527 |
books = 'Pick6'
|
528 |
prop_df = prop_df_raw.loc[prop_df_raw['book'] == books]
|
529 |
-
if prop_type_var == "NBA_GAME_PLAYER_POINTS"
|
530 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_POINTS']
|
|
|
|
|
531 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
532 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
533 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
@@ -535,8 +536,10 @@ with tab5:
|
|
535 |
prop_df['Over'] = 1 / prop_df['over_line']
|
536 |
prop_df['Under'] = 1 / prop_df['under_line']
|
537 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
538 |
-
elif prop_type_var == "NBA_GAME_PLAYER_REBOUNDS"
|
539 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_REBOUNDS']
|
|
|
|
|
540 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
541 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
542 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
@@ -544,8 +547,10 @@ with tab5:
|
|
544 |
prop_df['Over'] = 1 / prop_df['over_line']
|
545 |
prop_df['Under'] = 1 / prop_df['under_line']
|
546 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
547 |
-
elif prop_type_var == "NBA_GAME_PLAYER_ASSISTS"
|
548 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_ASSISTS']
|
|
|
|
|
549 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
550 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
551 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
@@ -553,8 +558,10 @@ with tab5:
|
|
553 |
prop_df['Over'] = 1 / prop_df['over_line']
|
554 |
prop_df['Under'] = 1 / prop_df['under_line']
|
555 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
556 |
-
elif prop_type_var == "NBA_GAME_PLAYER_3_POINTERS_MADE"
|
557 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_3_POINTERS_MADE']
|
|
|
|
|
558 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
559 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
560 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
@@ -562,8 +569,10 @@ with tab5:
|
|
562 |
prop_df['Over'] = 1 / prop_df['over_line']
|
563 |
prop_df['Under'] = 1 / prop_df['under_line']
|
564 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
565 |
-
elif prop_type_var == "NBA_GAME_PLAYER_POINTS_REBOUNDS_ASSISTS"
|
566 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_POINTS_REBOUNDS_ASSISTS']
|
|
|
|
|
567 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
568 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
569 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
@@ -571,8 +580,10 @@ with tab5:
|
|
571 |
prop_df['Over'] = 1 / prop_df['over_line']
|
572 |
prop_df['Under'] = 1 / prop_df['under_line']
|
573 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
574 |
-
elif prop_type_var == "NBA_GAME_PLAYER_POINTS_REBOUNDS"
|
575 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_POINTS_REBOUNDS']
|
|
|
|
|
576 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
577 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
578 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
@@ -580,8 +591,10 @@ with tab5:
|
|
580 |
prop_df['Over'] = 1 / prop_df['over_line']
|
581 |
prop_df['Under'] = 1 / prop_df['under_line']
|
582 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
583 |
-
elif prop_type_var == "NBA_GAME_PLAYER_POINTS_ASSISTS"
|
584 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_POINTS_ASSISTS']
|
|
|
|
|
585 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
586 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
587 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
@@ -589,8 +602,10 @@ with tab5:
|
|
589 |
prop_df['Over'] = 1 / prop_df['over_line']
|
590 |
prop_df['Under'] = 1 / prop_df['under_line']
|
591 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
592 |
-
elif prop_type_var == "NBA_GAME_PLAYER_REBOUNDS_ASSISTS"
|
593 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_REBOUNDS_ASSISTS']
|
|
|
|
|
594 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
595 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
596 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
|
|
439 |
|
440 |
df.replace("", 0, inplace=True)
|
441 |
|
442 |
+
if prop == "NBA_GAME_PLAYER_POINTS" or prop == "Points":
|
443 |
df['Median'] = df['Points']
|
444 |
+
elif prop == "NBA_GAME_PLAYER_REBOUNDS" or prop == "Rebounds":
|
445 |
df['Median'] = df['Rebounds']
|
446 |
+
elif prop == "NBA_GAME_PLAYER_ASSISTS" or prop == "Assists":
|
447 |
df['Median'] = df['Assists']
|
448 |
+
elif prop == "NBA_GAME_PLAYER_3_POINTERS_MADE" or prop == "3-Pointers Made":
|
449 |
df['Median'] = df['3P']
|
450 |
+
elif prop == "NBA_GAME_PLAYER_POINTS_REBOUNDS_ASSISTS" or prop == "Points + Rebounds + Assists":
|
451 |
df['Median'] = df['PRA']
|
452 |
+
elif prop == "NBA_GAME_PLAYER_POINTS_REBOUNDS" or prop == "Points + Rebounds":
|
453 |
df['Median'] = df['Points'] + df['Rebounds']
|
454 |
+
elif prop == "NBA_GAME_PLAYER_POINTS_ASSISTS" or prop == "Points + Assists":
|
455 |
df['Median'] = df['Points'] + df['Assists']
|
456 |
+
elif prop == "NBA_GAME_PLAYER_REBOUNDS_ASSISTS" or prop == "Assists + Rebounds":
|
457 |
df['Median'] = df['Rebounds'] + df['Assists']
|
458 |
|
459 |
flex_file = df
|
|
|
520 |
prop_df_raw = prop_frame[['Player', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
521 |
elif game_select_var == 'Pick6':
|
522 |
prop_df_raw = pick_frame[['Full_name', 'book', 'over_prop', 'over_line', 'under_line', 'prop_type']]
|
|
|
523 |
|
524 |
for books in ['FANDUEL', 'DRAFTKINGS', 'BET365', 'CONSENSUS']:
|
525 |
if game_select_var == 'Pick6':
|
526 |
books = 'Pick6'
|
527 |
prop_df = prop_df_raw.loc[prop_df_raw['book'] == books]
|
528 |
+
if prop_type_var == "NBA_GAME_PLAYER_POINTS":
|
529 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_POINTS']
|
530 |
+
elif prop_type_var == "Points":
|
531 |
+
prop_df = prop_df.loc[prop_df['prop_type'] == 'Points']
|
532 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
533 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
534 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
|
|
536 |
prop_df['Over'] = 1 / prop_df['over_line']
|
537 |
prop_df['Under'] = 1 / prop_df['under_line']
|
538 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
539 |
+
elif prop_type_var == "NBA_GAME_PLAYER_REBOUNDS":
|
540 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_REBOUNDS']
|
541 |
+
elif prop_type_var == "Rebounds":
|
542 |
+
prop_df = prop_df.loc[prop_df['prop_type'] == 'Rebounds']
|
543 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
544 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
545 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
|
|
547 |
prop_df['Over'] = 1 / prop_df['over_line']
|
548 |
prop_df['Under'] = 1 / prop_df['under_line']
|
549 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
550 |
+
elif prop_type_var == "NBA_GAME_PLAYER_ASSISTS":
|
551 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_ASSISTS']
|
552 |
+
elif prop_type_var == "Assists":
|
553 |
+
prop_df = prop_df.loc[prop_df['prop_type'] == 'Assists']
|
554 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
555 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
556 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
|
|
558 |
prop_df['Over'] = 1 / prop_df['over_line']
|
559 |
prop_df['Under'] = 1 / prop_df['under_line']
|
560 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
561 |
+
elif prop_type_var == "NBA_GAME_PLAYER_3_POINTERS_MADE":
|
562 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_3_POINTERS_MADE']
|
563 |
+
elif prop_type_var == "3-Pointers Made":
|
564 |
+
prop_df = prop_df.loc[prop_df['prop_type'] == '3-Pointers Made']
|
565 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
566 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
567 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
|
|
569 |
prop_df['Over'] = 1 / prop_df['over_line']
|
570 |
prop_df['Under'] = 1 / prop_df['under_line']
|
571 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
572 |
+
elif prop_type_var == "NBA_GAME_PLAYER_POINTS_REBOUNDS_ASSISTS":
|
573 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_POINTS_REBOUNDS_ASSISTS']
|
574 |
+
elif prop_type_var == "Points + Rebounds + Assists":
|
575 |
+
prop_df = prop_df.loc[prop_df['prop_type'] == 'Points + Rebounds + Assists']
|
576 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
577 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
578 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
|
|
580 |
prop_df['Over'] = 1 / prop_df['over_line']
|
581 |
prop_df['Under'] = 1 / prop_df['under_line']
|
582 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
583 |
+
elif prop_type_var == "NBA_GAME_PLAYER_POINTS_REBOUNDS":
|
584 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_POINTS_REBOUNDS']
|
585 |
+
elif prop_type_var == "Points + Rebounds":
|
586 |
+
prop_df = prop_df.loc[prop_df['prop_type'] == 'Points + Rebounds']
|
587 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
588 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
589 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
|
|
591 |
prop_df['Over'] = 1 / prop_df['over_line']
|
592 |
prop_df['Under'] = 1 / prop_df['under_line']
|
593 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
594 |
+
elif prop_type_var == "NBA_GAME_PLAYER_POINTS_ASSISTS":
|
595 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_POINTS_ASSISTS']
|
596 |
+
elif prop_type_var == "Points + Assists":
|
597 |
+
prop_df = prop_df.loc[prop_df['prop_type'] == 'Points + Assists']
|
598 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
599 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
600 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
|
|
602 |
prop_df['Over'] = 1 / prop_df['over_line']
|
603 |
prop_df['Under'] = 1 / prop_df['under_line']
|
604 |
df = pd.merge(player_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
605 |
+
elif prop_type_var == "NBA_GAME_PLAYER_REBOUNDS_ASSISTS":
|
606 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NBA_GAME_PLAYER_REBOUNDS_ASSISTS']
|
607 |
+
elif prop_type_var == "Assists + Rebounds":
|
608 |
+
prop_df = prop_df.loc[prop_df['prop_type'] == 'Assists + Rebounds']
|
609 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
610 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
611 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|