James McCool
commited on
Commit
·
c798bf5
1
Parent(s):
fd85ccf
needs to be a dictionary
Browse files
app.py
CHANGED
|
@@ -1742,8 +1742,7 @@ if selected_tab == 'Data Load':
|
|
| 1742 |
|
| 1743 |
if selected_tab == 'Manage Portfolio':
|
| 1744 |
if 'base_frame_names' not in st.session_state:
|
| 1745 |
-
st.session_state['base_frame_names'] =
|
| 1746 |
-
st.session_state['Default'] = None
|
| 1747 |
if 'origin_portfolio' in st.session_state and 'projections_df' in st.session_state:
|
| 1748 |
with st.container():
|
| 1749 |
reset_port_col, recalc_div_col, set_base_col, blank_reset_col, contest_size_col = st.columns([1, 1, 1, 6, 4])
|
|
@@ -1803,8 +1802,7 @@ if selected_tab == 'Manage Portfolio':
|
|
| 1803 |
st.session_state['working_frame']['Size'] = st.session_state['working_frame'].index.map(st.session_state['size_dict'])
|
| 1804 |
|
| 1805 |
st.session_state['base_frame'] = predict_dupes(st.session_state['working_frame'], st.session_state['map_dict'], site_var, type_var, Contest_Size, strength_var, sport_var, salary_max)
|
| 1806 |
-
st.session_state['Default'] = st.session_state['base_frame']
|
| 1807 |
-
st.session_state['working_frame'] = st.session_state['Default']
|
| 1808 |
# st.session_state['highest_owned_teams'] = st.session_state['projections_df'][~st.session_state['projections_df']['position'].isin(['P', 'SP'])].groupby('team')['ownership'].sum().sort_values(ascending=False).head(3).index.tolist()
|
| 1809 |
# st.session_state['highest_owned_pitchers'] = st.session_state['projections_df'][st.session_state['projections_df']['position'].isin(['P', 'SP'])]['player_names'].sort_values(by='ownership', ascending=False).head(3).tolist()
|
| 1810 |
|
|
|
|
| 1742 |
|
| 1743 |
if selected_tab == 'Manage Portfolio':
|
| 1744 |
if 'base_frame_names' not in st.session_state:
|
| 1745 |
+
st.session_state['base_frame_names'] = {'Default': None}
|
|
|
|
| 1746 |
if 'origin_portfolio' in st.session_state and 'projections_df' in st.session_state:
|
| 1747 |
with st.container():
|
| 1748 |
reset_port_col, recalc_div_col, set_base_col, blank_reset_col, contest_size_col = st.columns([1, 1, 1, 6, 4])
|
|
|
|
| 1802 |
st.session_state['working_frame']['Size'] = st.session_state['working_frame'].index.map(st.session_state['size_dict'])
|
| 1803 |
|
| 1804 |
st.session_state['base_frame'] = predict_dupes(st.session_state['working_frame'], st.session_state['map_dict'], site_var, type_var, Contest_Size, strength_var, sport_var, salary_max)
|
| 1805 |
+
st.session_state[base_frame_names]['Default'] = st.session_state['base_frame']
|
|
|
|
| 1806 |
# st.session_state['highest_owned_teams'] = st.session_state['projections_df'][~st.session_state['projections_df']['position'].isin(['P', 'SP'])].groupby('team')['ownership'].sum().sort_values(ascending=False).head(3).index.tolist()
|
| 1807 |
# st.session_state['highest_owned_pitchers'] = st.session_state['projections_df'][st.session_state['projections_df']['position'].isin(['P', 'SP'])]['player_names'].sort_values(by='ownership', ascending=False).head(3).tolist()
|
| 1808 |
|