Spaces:
Running
Running
James McCool
commited on
Commit
·
66c8e7d
1
Parent(s):
b86749e
Update position group selection variable in app.py for improved clarity and consistency, changing 'pos_var2' to 'group_var2' in user interface elements and related logic for player data filtering.
Browse files
app.py
CHANGED
@@ -306,7 +306,7 @@ with tab2:
|
|
306 |
with st.container():
|
307 |
slate_type_var2 = st.radio("Which slate type are you loading?", ('Regular', 'Showdown'), key='slate_type_var2')
|
308 |
slate_var2 = st.radio("Which slate data are you loading?", ('Main', 'Secondary', 'Auxiliary'), key='slate_var2')
|
309 |
-
|
310 |
team_var2 = st.selectbox("Which team would you like to view?", ['All', 'Specific'], key='team_var2')
|
311 |
if team_var2 == 'Specific':
|
312 |
team_select2 = st.multiselect("Select your team(s)", roo_data['Team'].unique(), key='team_select2')
|
@@ -322,22 +322,22 @@ with tab2:
|
|
322 |
|
323 |
player_roo_raw = dk_roo.copy()
|
324 |
|
325 |
-
if
|
326 |
pass
|
327 |
-
elif
|
328 |
player_roo_raw = player_roo_raw[player_roo_raw['pos_group'] == 'Pitchers']
|
329 |
-
elif
|
330 |
player_roo_raw = player_roo_raw[player_roo_raw['pos_group'] == 'Hitters']
|
331 |
|
332 |
elif site_var == 'Fanduel':
|
333 |
|
334 |
player_roo_raw = fd_roo.copy()
|
335 |
|
336 |
-
if
|
337 |
pass
|
338 |
-
elif
|
339 |
player_roo_raw = player_roo_raw[player_roo_raw['pos_group'] == 'Pitchers']
|
340 |
-
elif
|
341 |
player_roo_raw = player_roo_raw[player_roo_raw['pos_group'] == 'Hitters']
|
342 |
|
343 |
if slate_var2 == 'Main':
|
|
|
306 |
with st.container():
|
307 |
slate_type_var2 = st.radio("Which slate type are you loading?", ('Regular', 'Showdown'), key='slate_type_var2')
|
308 |
slate_var2 = st.radio("Which slate data are you loading?", ('Main', 'Secondary', 'Auxiliary'), key='slate_var2')
|
309 |
+
group_var2 = st.radio("Which position group would you like to view?", ('All', 'Pitchers', 'Hitters'), key='group_var2')
|
310 |
team_var2 = st.selectbox("Which team would you like to view?", ['All', 'Specific'], key='team_var2')
|
311 |
if team_var2 == 'Specific':
|
312 |
team_select2 = st.multiselect("Select your team(s)", roo_data['Team'].unique(), key='team_select2')
|
|
|
322 |
|
323 |
player_roo_raw = dk_roo.copy()
|
324 |
|
325 |
+
if group_var2 == 'All':
|
326 |
pass
|
327 |
+
elif group_var2 == 'Pitchers':
|
328 |
player_roo_raw = player_roo_raw[player_roo_raw['pos_group'] == 'Pitchers']
|
329 |
+
elif group_var2 == 'Hitters':
|
330 |
player_roo_raw = player_roo_raw[player_roo_raw['pos_group'] == 'Hitters']
|
331 |
|
332 |
elif site_var == 'Fanduel':
|
333 |
|
334 |
player_roo_raw = fd_roo.copy()
|
335 |
|
336 |
+
if group_var2 == 'All':
|
337 |
pass
|
338 |
+
elif group_var2 == 'Pitchers':
|
339 |
player_roo_raw = player_roo_raw[player_roo_raw['pos_group'] == 'Pitchers']
|
340 |
+
elif group_var2 == 'Hitters':
|
341 |
player_roo_raw = player_roo_raw[player_roo_raw['pos_group'] == 'Hitters']
|
342 |
|
343 |
if slate_var2 == 'Main':
|