James McCool
commited on
Commit
·
bf942c2
1
Parent(s):
fb3a403
Update session state condition in app.py to prevent analysis execution when 'origin_portfolio' is present. This change enhances the accuracy of the name matching analysis by ensuring proper data handling based on user interactions.
Browse files
app.py
CHANGED
@@ -180,7 +180,7 @@ with tab1:
|
|
180 |
projections = projections.apply(lambda x: x.replace(player_wrong_names_mlb, player_right_names_mlb))
|
181 |
st.dataframe(projections.head(10))
|
182 |
|
183 |
-
if portfolio_file and projections_file:
|
184 |
if st.session_state['portfolio'] is not None and projections is not None:
|
185 |
st.subheader("Name Matching Analysis")
|
186 |
# Initialize projections_df in session state if it doesn't exist
|
|
|
180 |
projections = projections.apply(lambda x: x.replace(player_wrong_names_mlb, player_right_names_mlb))
|
181 |
st.dataframe(projections.head(10))
|
182 |
|
183 |
+
if portfolio_file and projections_file and 'origin_portfolio' not in st.session_state:
|
184 |
if st.session_state['portfolio'] is not None and projections is not None:
|
185 |
st.subheader("Name Matching Analysis")
|
186 |
# Initialize projections_df in session state if it doesn't exist
|