James McCool
commited on
Commit
·
15b2912
1
Parent(s):
fbd7505
Refactor multiselect options in 'Manage Portfolio' section of 'app.py' to remove unnecessary sorting, improving performance and clarity in player and team selection.
Browse files
app.py
CHANGED
|
@@ -1295,12 +1295,12 @@ if selected_tab == 'Manage Portfolio':
|
|
| 1295 |
player_names.update(st.session_state['working_frame'][col].unique())
|
| 1296 |
if type_var == 'Showdown':
|
| 1297 |
cpt_flex_focus = st.selectbox("Focus on Overall, CPT, or FLEX?", options=['Overall', 'CPT', 'FLEX'], index=0)
|
| 1298 |
-
player_lock = st.multiselect("Lock players?", options=
|
| 1299 |
-
player_remove = st.multiselect("Remove players?", options=
|
| 1300 |
-
team_include = st.multiselect("Include teams?", options=
|
| 1301 |
-
team_remove = st.multiselect("Remove teams?", options=
|
| 1302 |
if sport_var in stacking_sports:
|
| 1303 |
-
size_include = st.multiselect("Include sizes?", options=
|
| 1304 |
else:
|
| 1305 |
size_include = []
|
| 1306 |
|
|
|
|
| 1295 |
player_names.update(st.session_state['working_frame'][col].unique())
|
| 1296 |
if type_var == 'Showdown':
|
| 1297 |
cpt_flex_focus = st.selectbox("Focus on Overall, CPT, or FLEX?", options=['Overall', 'CPT', 'FLEX'], index=0)
|
| 1298 |
+
player_lock = st.multiselect("Lock players?", options=list(player_names), default=[])
|
| 1299 |
+
player_remove = st.multiselect("Remove players?", options=list(player_names), default=[])
|
| 1300 |
+
team_include = st.multiselect("Include teams?", options=list(set(st.session_state['projections_df']['team'].unique())), default=[])
|
| 1301 |
+
team_remove = st.multiselect("Remove teams?", options=list(set(st.session_state['projections_df']['team'].unique())), default=[])
|
| 1302 |
if sport_var in stacking_sports:
|
| 1303 |
+
size_include = st.multiselect("Include sizes?", options=list(set(st.session_state['working_frame']['Size'].unique())), default=[])
|
| 1304 |
else:
|
| 1305 |
size_include = []
|
| 1306 |
|