Multichem commited on
Commit
e7846f5
·
verified ·
1 Parent(s): 41070c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
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 = ['Strikeouts', 'Wins', 'Quality_starts'], key='prop_type_var_h')
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 prop_type_var_sp == 'Strikeouts':
202
- df['Median'] = df['Strikeouts']
203
- elif prop_type_var_sp == 'Wins':
204
- df['Median'] = df['Wins']
205
- elif prop_type_var_sp == 'Quality_starts':
206
- df['Median'] = df['Quality_starts']
 
 
 
 
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)