Spaces:
Running
Running
James McCool
commited on
Commit
·
590da2e
1
Parent(s):
5b493e6
Refactor position mapping logic in app.py to use sim_site_var1 for site selection in FLEX column calculations. This change enhances clarity and consistency in handling position mappings for Draftkings and Fanduel, ensuring accurate data processing in simulations.
Browse files
app.py
CHANGED
@@ -549,9 +549,9 @@ with tab1:
|
|
549 |
with tab2:
|
550 |
if 'Sim_Winner_Display' in st.session_state:
|
551 |
# Apply position mapping to FLEX column
|
552 |
-
if
|
553 |
flex_positions = st.session_state.freq_copy['FLEX'].map(st.session_state.maps_dict['Pos_map'])
|
554 |
-
elif
|
555 |
flex1_positions = st.session_state.freq_copy['FLEX1'].map(st.session_state.maps_dict['Pos_map'])
|
556 |
flex2_positions = st.session_state.freq_copy['FLEX2'].map(st.session_state.maps_dict['Pos_map'])
|
557 |
flex_positions = pd.concat([flex1_positions, flex2_positions])
|
|
|
549 |
with tab2:
|
550 |
if 'Sim_Winner_Display' in st.session_state:
|
551 |
# Apply position mapping to FLEX column
|
552 |
+
if sim_site_var1 == 'Draftkings':
|
553 |
flex_positions = st.session_state.freq_copy['FLEX'].map(st.session_state.maps_dict['Pos_map'])
|
554 |
+
elif sim_site_var1 == 'Fanduel':
|
555 |
flex1_positions = st.session_state.freq_copy['FLEX1'].map(st.session_state.maps_dict['Pos_map'])
|
556 |
flex2_positions = st.session_state.freq_copy['FLEX2'].map(st.session_state.maps_dict['Pos_map'])
|
557 |
flex_positions = pd.concat([flex1_positions, flex2_positions])
|