Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -50,18 +50,29 @@ def player_stat_table():
|
|
50 |
return raw_display
|
51 |
|
52 |
@st.cache_data
|
53 |
-
def
|
54 |
sh = gc.open_by_url(master_hold)
|
55 |
worksheet = sh.worksheet('DK_ROO')
|
56 |
raw_display = worksheet.acell('U2').value
|
57 |
|
58 |
return raw_display
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
game_model = game_betting_model()
|
61 |
overall_stats = player_stat_table()
|
62 |
qb_stats = overall_stats.loc[overall_stats['Position'] == 'QB']
|
63 |
non_qb_stats = overall_stats.loc[overall_stats['Position'] != 'QB']
|
64 |
-
timestamp =
|
|
|
65 |
t_stamp = f"Last Update: " + str(timestamp) + f" CST"
|
66 |
|
67 |
tab1, tab2, tab3, tab4, tab5 = st.tabs(["Game Betting Model", "QB Projections", "RB/WR/TE Projections", "Player Prop Simulations", "Stat Specific Simulations"])
|
|
|
50 |
return raw_display
|
51 |
|
52 |
@st.cache_data
|
53 |
+
def timestamp_table():
|
54 |
sh = gc.open_by_url(master_hold)
|
55 |
worksheet = sh.worksheet('DK_ROO')
|
56 |
raw_display = worksheet.acell('U2').value
|
57 |
|
58 |
return raw_display
|
59 |
|
60 |
+
@st.cache_data
|
61 |
+
def player_prop_table():
|
62 |
+
sh = gc.open_by_url(master_hold)
|
63 |
+
worksheet = sh.worksheet('prop_frame')
|
64 |
+
raw_display = pd.DataFrame(worksheet.get_all_records())
|
65 |
+
raw_display.replace('', np.nan, inplace=True)
|
66 |
+
raw_display = raw_display.dropna()
|
67 |
+
|
68 |
+
return raw_display
|
69 |
+
|
70 |
game_model = game_betting_model()
|
71 |
overall_stats = player_stat_table()
|
72 |
qb_stats = overall_stats.loc[overall_stats['Position'] == 'QB']
|
73 |
non_qb_stats = overall_stats.loc[overall_stats['Position'] != 'QB']
|
74 |
+
timestamp = timestamp_table()
|
75 |
+
prop_frame = player_prop_table()
|
76 |
t_stamp = f"Last Update: " + str(timestamp) + f" CST"
|
77 |
|
78 |
tab1, tab2, tab3, tab4, tab5 = st.tabs(["Game Betting Model", "QB Projections", "RB/WR/TE Projections", "Player Prop Simulations", "Stat Specific Simulations"])
|