James McCool
commited on
Commit
·
74fde7d
1
Parent(s):
a6f8dd9
okay yeah that should work
Browse files
app.py
CHANGED
|
@@ -1742,6 +1742,8 @@ if selected_tab == 'Data Load':
|
|
| 1742 |
|
| 1743 |
if selected_tab == 'Manage Portfolio':
|
| 1744 |
if 'origin_portfolio' in st.session_state and 'projections_df' in st.session_state:
|
|
|
|
|
|
|
| 1745 |
with st.container():
|
| 1746 |
reset_port_col, recalc_div_col, set_base_col, blank_reset_col, contest_size_col = st.columns([1, 1, 1, 6, 4])
|
| 1747 |
with reset_port_col:
|
|
@@ -1800,7 +1802,7 @@ if selected_tab == 'Manage Portfolio':
|
|
| 1800 |
st.session_state['working_frame']['Size'] = st.session_state['working_frame'].index.map(st.session_state['size_dict'])
|
| 1801 |
|
| 1802 |
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)
|
| 1803 |
-
st.session_state[f'
|
| 1804 |
st.session_state['working_frame'] = st.session_state['base_frame']
|
| 1805 |
# 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()
|
| 1806 |
# 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()
|
|
|
|
| 1742 |
|
| 1743 |
if selected_tab == 'Manage Portfolio':
|
| 1744 |
if 'origin_portfolio' in st.session_state and 'projections_df' in st.session_state:
|
| 1745 |
+
if 'base_frame_names' not in st.session_state:
|
| 1746 |
+
st.session_state['base_frame_names'] = ['Default']
|
| 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])
|
| 1749 |
with reset_port_col:
|
|
|
|
| 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[f'Default'] = st.session_state['base_frame']
|
| 1806 |
st.session_state['working_frame'] = st.session_state['base_frame']
|
| 1807 |
# 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()
|
| 1808 |
# 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()
|