Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -185,7 +185,7 @@ with tab4:
|
|
| 185 |
df_hold_container = st.empty()
|
| 186 |
|
| 187 |
with col1:
|
| 188 |
-
prop_type_var_h = st.selectbox('Select type of prop to simulate', options = ['
|
| 189 |
|
| 190 |
if st.button('Simulate Stat', key='sim_h'):
|
| 191 |
with col2:
|
|
@@ -198,12 +198,16 @@ with tab4:
|
|
| 198 |
|
| 199 |
df.replace("", 0, inplace=True)
|
| 200 |
|
| 201 |
-
if
|
| 202 |
-
df['Median'] = df['
|
| 203 |
-
elif
|
| 204 |
-
df['Median'] = df['
|
| 205 |
-
elif
|
| 206 |
-
df['Median'] = df['
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
|
| 208 |
flex_file = df
|
| 209 |
flex_file.rename(columns={"Name": "Player"}, inplace = True)
|
|
|
|
| 185 |
df_hold_container = st.empty()
|
| 186 |
|
| 187 |
with col1:
|
| 188 |
+
prop_type_var_h = st.selectbox('Select type of prop to simulate', options = ['Hits', 'Doubles', 'Home Runs', 'RBI', 'Stolen Bases'], key='prop_type_var_h')
|
| 189 |
|
| 190 |
if st.button('Simulate Stat', key='sim_h'):
|
| 191 |
with col2:
|
|
|
|
| 198 |
|
| 199 |
df.replace("", 0, inplace=True)
|
| 200 |
|
| 201 |
+
if prop_type_var_h == 'Hits':
|
| 202 |
+
df['Median'] = df['xHits']
|
| 203 |
+
elif prop_type_var_h == 'Doubles':
|
| 204 |
+
df['Median'] = df['Doubles']
|
| 205 |
+
elif prop_type_var_h == 'Home Runs':
|
| 206 |
+
df['Median'] = df['Homeruns']
|
| 207 |
+
elif prop_type_var_h == 'RBI':
|
| 208 |
+
df['Median'] = df['RBI']
|
| 209 |
+
elif prop_type_var_h == 'Stolen Bases':
|
| 210 |
+
df['Median'] = df['Stolen_bases']
|
| 211 |
|
| 212 |
flex_file = df
|
| 213 |
flex_file.rename(columns={"Name": "Player"}, inplace = True)
|