James McCool
commited on
Commit
·
2eb6ff3
1
Parent(s):
d864275
Reintroduce salary cap filtering for working frame in app.py to ensure only eligible players are loaded. This update enhances data integrity and aligns with previous optimizations for memory efficiency.
Browse files
app.py
CHANGED
@@ -1327,7 +1327,6 @@ if selected_tab == 'Manage Portfolio':
|
|
1327 |
if 'working_frame' not in st.session_state:
|
1328 |
st.session_state['settings_base'] = True
|
1329 |
st.session_state['working_frame'] = pd.read_parquet(io.BytesIO(st.session_state['origin_portfolio']))
|
1330 |
-
st.session_state['working_frame'] = st.session_state['working_frame'][st.session_state['working_frame']['salary'] <= salary_max]
|
1331 |
st.session_state['player_columns'] = [col for col in st.session_state['working_frame'].columns if col not in excluded_cols]
|
1332 |
|
1333 |
# Use vectorized calculation function
|
@@ -1339,6 +1338,7 @@ if selected_tab == 'Manage Portfolio':
|
|
1339 |
sport_var,
|
1340 |
st.session_state['projections_df'] if 'stack_dict' in st.session_state else None
|
1341 |
)
|
|
|
1342 |
|
1343 |
# Map existing stack/size data if available
|
1344 |
if 'stack_dict' in st.session_state:
|
|
|
1327 |
if 'working_frame' not in st.session_state:
|
1328 |
st.session_state['settings_base'] = True
|
1329 |
st.session_state['working_frame'] = pd.read_parquet(io.BytesIO(st.session_state['origin_portfolio']))
|
|
|
1330 |
st.session_state['player_columns'] = [col for col in st.session_state['working_frame'].columns if col not in excluded_cols]
|
1331 |
|
1332 |
# Use vectorized calculation function
|
|
|
1338 |
sport_var,
|
1339 |
st.session_state['projections_df'] if 'stack_dict' in st.session_state else None
|
1340 |
)
|
1341 |
+
st.session_state['working_frame'] = st.session_state['working_frame'][st.session_state['working_frame']['salary'] <= salary_max]
|
1342 |
|
1343 |
# Map existing stack/size data if available
|
1344 |
if 'stack_dict' in st.session_state:
|