James McCool
commited on
Commit
·
b812729
1
Parent(s):
182bd5f
pingarooni
Browse files
app.py
CHANGED
|
@@ -1641,11 +1641,9 @@ if selected_tab == 'Data Load':
|
|
| 1641 |
projections['captain ownership'] = projections['captain ownership'].astype('float32')
|
| 1642 |
projections['median'] = projections['median'].astype('float32')
|
| 1643 |
|
| 1644 |
-
# More efficient string replacement for projections
|
| 1645 |
for col in projections.select_dtypes(include=['object']).columns:
|
| 1646 |
projections[col] = projections[col].replace(player_wrong_names_mlb)
|
| 1647 |
|
| 1648 |
-
# Set position/team variables if needed
|
| 1649 |
if position_var is not None:
|
| 1650 |
projections['position'] = position_var
|
| 1651 |
if team_var is not None:
|
|
@@ -1666,7 +1664,6 @@ if selected_tab == 'Data Load':
|
|
| 1666 |
csv_names = st.session_state['csv_file']['Nickname'].tolist()
|
| 1667 |
projection_names = projections['player_names'].tolist()
|
| 1668 |
|
| 1669 |
-
# Use chunked name matching for memory efficiency
|
| 1670 |
portfolio_match_dict, unmatched_names = chunk_name_matching(portfolio_names, csv_names)
|
| 1671 |
|
| 1672 |
# Update portfolio with matched names (in-place to save memory)
|
|
|
|
| 1641 |
projections['captain ownership'] = projections['captain ownership'].astype('float32')
|
| 1642 |
projections['median'] = projections['median'].astype('float32')
|
| 1643 |
|
|
|
|
| 1644 |
for col in projections.select_dtypes(include=['object']).columns:
|
| 1645 |
projections[col] = projections[col].replace(player_wrong_names_mlb)
|
| 1646 |
|
|
|
|
| 1647 |
if position_var is not None:
|
| 1648 |
projections['position'] = position_var
|
| 1649 |
if team_var is not None:
|
|
|
|
| 1664 |
csv_names = st.session_state['csv_file']['Nickname'].tolist()
|
| 1665 |
projection_names = projections['player_names'].tolist()
|
| 1666 |
|
|
|
|
| 1667 |
portfolio_match_dict, unmatched_names = chunk_name_matching(portfolio_names, csv_names)
|
| 1668 |
|
| 1669 |
# Update portfolio with matched names (in-place to save memory)
|