James McCool
commited on
Commit
·
4151add
1
Parent(s):
d142a86
Update regex handling for CFB lineup processing in load_contest_file.py
Browse files- Changed the regex parameter in the DataFrame replacement for CFB lineup processing to ensure accurate parsing of player positions.
- This adjustment improves the reliability of data handling for college football lineups, enhancing overall functionality.
global_func/load_contest_file.py
CHANGED
|
@@ -120,7 +120,7 @@ def load_contest_file(upload, type, helper = None, sport = None, portfolio = Non
|
|
| 120 |
elif sport == 'NAS':
|
| 121 |
cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' D ', 'D '], value=',', regex=True)
|
| 122 |
elif sport == 'CFB':
|
| 123 |
-
cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' QB ', 'QB ', ' RB ', 'RB ', 'WR ', 'WR ', ' FLEX ', 'FLEX ', '
|
| 124 |
print(sport)
|
| 125 |
check_lineups = cleaned_df.copy()
|
| 126 |
if sport == 'MLB':
|
|
|
|
| 120 |
elif sport == 'NAS':
|
| 121 |
cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' D ', 'D '], value=',', regex=True)
|
| 122 |
elif sport == 'CFB':
|
| 123 |
+
cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' QB ', 'QB ', ' RB ', 'RB ', 'WR ', 'WR ', ' S-FLEX ', 'S-FLEX ', ' FLEX ', 'FLEX '], value=',', regex=True)
|
| 124 |
print(sport)
|
| 125 |
check_lineups = cleaned_df.copy()
|
| 126 |
if sport == 'MLB':
|