James McCool commited on
Commit
3dc6731
·
1 Parent(s): 1e08ae6

Update cleaned_df column names in load_contest_file.py to improve clarity and avoid confusion

Browse files

- Changed column names from 'UTIL' to 'UTIL1', 'UTIL2', 'UTIL3', 'UTIL4', and 'UTIL5' in cleaned_df to enhance data representation.
- Maintained existing functionality while improving the organization and readability of contest data processing.

Files changed (1) hide show
  1. global_func/load_contest_file.py +1 -1
global_func/load_contest_file.py CHANGED
@@ -130,7 +130,7 @@ def load_contest_file(upload, type, helper = None, sport = None):
130
  cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' UTIL ', 'CPT '], value=',', regex=True)
131
  print(type)
132
  check_lineups = cleaned_df.copy()
133
- cleaned_df[['Remove', 'CPT', 'UTIL', 'UTIL', 'UTIL', 'UTIL', 'UTIL']] = cleaned_df['Lineup'].str.split(',', expand=True)
134
  cleaned_df = cleaned_df.drop(columns=['Lineup', 'Remove'])
135
  entry_counts = cleaned_df['BaseName'].value_counts()
136
  cleaned_df['EntryCount'] = cleaned_df['BaseName'].map(entry_counts)
 
130
  cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' UTIL ', 'CPT '], value=',', regex=True)
131
  print(type)
132
  check_lineups = cleaned_df.copy()
133
+ cleaned_df[['Remove', 'CPT', 'UTIL1', 'UTIL2', 'UTIL3', 'UTIL4', 'UTIL5']] = cleaned_df['Lineup'].str.split(',', expand=True)
134
  cleaned_df = cleaned_df.drop(columns=['Lineup', 'Remove'])
135
  entry_counts = cleaned_df['BaseName'].value_counts()
136
  cleaned_df['EntryCount'] = cleaned_df['BaseName'].map(entry_counts)