James McCool
commited on
Commit
·
9ba550c
1
Parent(s):
2ab6242
Add NFL support for lineup cleaning in load_contest_file.py
Browse files- Enhanced the lineup cleaning logic to include NFL sport, ensuring consistent formatting by replacing ' FLEX ' and 'CPT ' with a comma in the lineup data.
- Maintained existing functionality for NHL and GOLF sports, improving overall data handling for contest files.
global_func/load_contest_file.py
CHANGED
|
@@ -159,6 +159,8 @@ def load_contest_file(upload, type, helper = None, sport = None, portfolio = Non
|
|
| 159 |
elif type == 'Showdown':
|
| 160 |
if sport == 'NHL':
|
| 161 |
cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' FLEX ', 'CPT '], value=',', regex=True)
|
|
|
|
|
|
|
| 162 |
if sport == 'GOLF':
|
| 163 |
cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' G ', 'G '], value=',', regex=True)
|
| 164 |
elif sport == 'NAS':
|
|
|
|
| 159 |
elif type == 'Showdown':
|
| 160 |
if sport == 'NHL':
|
| 161 |
cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' FLEX ', 'CPT '], value=',', regex=True)
|
| 162 |
+
if sport == 'NFL':
|
| 163 |
+
cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' FLEX ', 'CPT '], value=',', regex=True)
|
| 164 |
if sport == 'GOLF':
|
| 165 |
cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' G ', 'G '], value=',', regex=True)
|
| 166 |
elif sport == 'NAS':
|