Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,7 +66,7 @@ with tab1:
|
|
| 66 |
st.cache_data.clear()
|
| 67 |
pitcher_proj, hitter_proj = init_baselines()
|
| 68 |
raw_frame = pitcher_proj
|
| 69 |
-
|
| 70 |
'Walk%', 'Walks', 'Runs%', 'Runs', 'ERA', 'Wins', 'Quality_starts', 'ADP', 'UD_fpts']]
|
| 71 |
disp_frame = raw_frame[['Name', 'Team', 'TBF', 'True_AVG', 'Hits', 'Singles', 'Doubles', 'Homeruns', 'Strikeouts',
|
| 72 |
'Walks', 'Runs', 'ERA', 'Wins', 'Quality_starts', 'ADP', 'UD_fpts']]
|
|
@@ -74,7 +74,7 @@ with tab1:
|
|
| 74 |
|
| 75 |
st.download_button(
|
| 76 |
label="Export Pitcher Projections",
|
| 77 |
-
data=convert_df_to_csv(
|
| 78 |
file_name='MLB_pitcher_proj_export.csv',
|
| 79 |
mime='text/csv',
|
| 80 |
key='pitcher_proj_export',
|
|
@@ -85,7 +85,7 @@ with tab2:
|
|
| 85 |
st.cache_data.clear()
|
| 86 |
pitcher_proj, hitter_proj = init_baselines()
|
| 87 |
raw_frame = hitter_proj
|
| 88 |
-
|
| 89 |
'xHR%', 'Homeruns', 'Runs%', 'Runs', 'RBI%', 'RBI', 'Steal%', 'Stolen_bases', 'UD_fpts', 'ADP']]
|
| 90 |
disp_frame = raw_frame[['Name', 'Team', 'PA', 'Walks', 'xHits', 'Singles', 'Doubles',
|
| 91 |
'Homeruns', 'Runs', 'RBI', 'Stolen_bases', 'UD_fpts', 'ADP']]
|
|
@@ -93,7 +93,7 @@ with tab2:
|
|
| 93 |
|
| 94 |
st.download_button(
|
| 95 |
label="Export Hitter Projections",
|
| 96 |
-
data=convert_df_to_csv(
|
| 97 |
file_name='MLB_hitter_proj_export.csv',
|
| 98 |
mime='text/csv',
|
| 99 |
key='hitter_proj_export',
|
|
|
|
| 66 |
st.cache_data.clear()
|
| 67 |
pitcher_proj, hitter_proj = init_baselines()
|
| 68 |
raw_frame = pitcher_proj
|
| 69 |
+
export_frame_sp = raw_frame[['Name', 'Team', 'TBF', 'Ceiling_var', 'True_AVG', 'Hits', 'Singles%', 'Singles', 'Doubles%', 'Doubles', 'xHR%', 'Homeruns', 'Strikeout%', 'Strikeouts',
|
| 70 |
'Walk%', 'Walks', 'Runs%', 'Runs', 'ERA', 'Wins', 'Quality_starts', 'ADP', 'UD_fpts']]
|
| 71 |
disp_frame = raw_frame[['Name', 'Team', 'TBF', 'True_AVG', 'Hits', 'Singles', 'Doubles', 'Homeruns', 'Strikeouts',
|
| 72 |
'Walks', 'Runs', 'ERA', 'Wins', 'Quality_starts', 'ADP', 'UD_fpts']]
|
|
|
|
| 74 |
|
| 75 |
st.download_button(
|
| 76 |
label="Export Pitcher Projections",
|
| 77 |
+
data=convert_df_to_csv(export_frame_sp),
|
| 78 |
file_name='MLB_pitcher_proj_export.csv',
|
| 79 |
mime='text/csv',
|
| 80 |
key='pitcher_proj_export',
|
|
|
|
| 85 |
st.cache_data.clear()
|
| 86 |
pitcher_proj, hitter_proj = init_baselines()
|
| 87 |
raw_frame = hitter_proj
|
| 88 |
+
export_frame_h = raw_frame[['Name', 'Team', 'PA', 'Ceiling_var', 'Walk%', 'Walks', 'xHits', 'Singles%', 'Singles', 'Doubles%', 'Doubles',
|
| 89 |
'xHR%', 'Homeruns', 'Runs%', 'Runs', 'RBI%', 'RBI', 'Steal%', 'Stolen_bases', 'UD_fpts', 'ADP']]
|
| 90 |
disp_frame = raw_frame[['Name', 'Team', 'PA', 'Walks', 'xHits', 'Singles', 'Doubles',
|
| 91 |
'Homeruns', 'Runs', 'RBI', 'Stolen_bases', 'UD_fpts', 'ADP']]
|
|
|
|
| 93 |
|
| 94 |
st.download_button(
|
| 95 |
label="Export Hitter Projections",
|
| 96 |
+
data=convert_df_to_csv(export_frame_h),
|
| 97 |
file_name='MLB_hitter_proj_export.csv',
|
| 98 |
mime='text/csv',
|
| 99 |
key='hitter_proj_export',
|