Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ st.set_page_config(layout="wide")
|
|
28 |
american_format = {'OwnAvg': '{:.2%}'}
|
29 |
stacks_format = {'Total Own': '{:.2%}'}
|
30 |
|
31 |
-
@st.cache_resource(ttl =
|
32 |
def init_baselines():
|
33 |
sh = gc.open_by_url("https://docs.google.com/spreadsheets/d/17OAf4OAfW92-loMNUFvIubNmgF9111dsObybo6xhtYY/edit?gid=1468336051#gid=1468336051")
|
34 |
worksheet = sh.worksheet('QB')
|
@@ -125,6 +125,7 @@ def init_baselines():
|
|
125 |
frame_hold = pd.DataFrame(cell_vals, columns=['Team', 'Opp', 'd1', 'd2', 'Game Stack', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd9', 'd10', 'd11', 'd12', 'd13', 'd14', 'Team Stack',
|
126 |
'15', '16', '17', '18', '19', '20', '21', 'Total Stack Cost', 'Total Own', 'Total Points', 'Points/$'])
|
127 |
frame_hold['Total Own'] = frame_hold['Total Own'].str.replace('%', '').astype(float)/100
|
|
|
128 |
stack_frame = frame_hold[['Team', 'Opp', 'Game Stack', 'Team Stack', 'Total Stack Cost', 'Total Own', 'Total Points', 'Points/$']]
|
129 |
|
130 |
string_cols = ['Team', 'Opp']
|
|
|
28 |
american_format = {'OwnAvg': '{:.2%}'}
|
29 |
stacks_format = {'Total Own': '{:.2%}'}
|
30 |
|
31 |
+
@st.cache_resource(ttl = 600)
|
32 |
def init_baselines():
|
33 |
sh = gc.open_by_url("https://docs.google.com/spreadsheets/d/17OAf4OAfW92-loMNUFvIubNmgF9111dsObybo6xhtYY/edit?gid=1468336051#gid=1468336051")
|
34 |
worksheet = sh.worksheet('QB')
|
|
|
125 |
frame_hold = pd.DataFrame(cell_vals, columns=['Team', 'Opp', 'd1', 'd2', 'Game Stack', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd9', 'd10', 'd11', 'd12', 'd13', 'd14', 'Team Stack',
|
126 |
'15', '16', '17', '18', '19', '20', '21', 'Total Stack Cost', 'Total Own', 'Total Points', 'Points/$'])
|
127 |
frame_hold['Total Own'] = frame_hold['Total Own'].str.replace('%', '').astype(float)/100
|
128 |
+
frame_hold['Total Stack Cost'] = frame_hold['Total Stack Cost'].str.replace([',', '.'], 0).astype(float)/100
|
129 |
stack_frame = frame_hold[['Team', 'Opp', 'Game Stack', 'Team Stack', 'Total Stack Cost', 'Total Own', 'Total Points', 'Points/$']]
|
130 |
|
131 |
string_cols = ['Team', 'Opp']
|