James McCool
commited on
Commit
·
0327da6
1
Parent(s):
2022d2c
Refactor combined frame creation in 'Manage Portfolio' to exclude unnecessary columns, enhancing data processing efficiency and consistency.
Browse files
app.py
CHANGED
@@ -1619,7 +1619,7 @@ if selected_tab == 'Manage Portfolio':
|
|
1619 |
num_modified_rows = len(st.session_state['working_frame'])
|
1620 |
|
1621 |
# Concatenate the modified frame with the base frame
|
1622 |
-
combined_frame = pd.concat([st.session_state['working_frame'], st.session_state['base_frame']], ignore_index=True)
|
1623 |
|
1624 |
# Run predict_dupes on the combined frame
|
1625 |
updated_combined_frame = predict_dupes(combined_frame, st.session_state['map_dict'], site_var, type_var, Contest_Size, strength_var, sport_var, salary_max)
|
@@ -1726,7 +1726,7 @@ if selected_tab == 'Manage Portfolio':
|
|
1726 |
print(num_modified_rows)
|
1727 |
|
1728 |
# Concatenate the modified frame with the base frame
|
1729 |
-
combined_frame = pd.concat([st.session_state['export_base'], st.session_state['base_frame']], ignore_index=True)
|
1730 |
print(len(combined_frame))
|
1731 |
|
1732 |
# Run predict_dupes on the combined frame
|
|
|
1619 |
num_modified_rows = len(st.session_state['working_frame'])
|
1620 |
|
1621 |
# Concatenate the modified frame with the base frame
|
1622 |
+
combined_frame = pd.concat([st.session_state['working_frame'].drop(columns=['Dupes', 'Finish_percentile', 'Lineup Edge', 'Win%', 'Weighted Own', 'Geomean', 'Diversity']), st.session_state['base_frame'].drop(columns=['Dupes', 'Finish_percentile', 'Lineup Edge', 'Win%', 'Weighted Own', 'Geomean', 'Diversity'])], ignore_index=True)
|
1623 |
|
1624 |
# Run predict_dupes on the combined frame
|
1625 |
updated_combined_frame = predict_dupes(combined_frame, st.session_state['map_dict'], site_var, type_var, Contest_Size, strength_var, sport_var, salary_max)
|
|
|
1726 |
print(num_modified_rows)
|
1727 |
|
1728 |
# Concatenate the modified frame with the base frame
|
1729 |
+
combined_frame = pd.concat([st.session_state['export_base'].drop(columns=['Dupes', 'Finish_percentile', 'Lineup Edge', 'Win%', 'Weighted Own', 'Geomean', 'Diversity']), st.session_state['base_frame'].drop(columns=['Dupes', 'Finish_percentile', 'Lineup Edge', 'Win%', 'Weighted Own', 'Geomean', 'Diversity'])], ignore_index=True)
|
1730 |
print(len(combined_frame))
|
1731 |
|
1732 |
# Run predict_dupes on the combined frame
|