James McCool commited on
Commit
47c6390
·
1 Parent(s): e076a1d

Reorder columns for CFB lineup processing in load_contest_file.py

Browse files

- Adjusted the order of columns in the DataFrame for CFB lineup processing to enhance clarity and consistency in data handling.
- This change improves the structure of the loaded data, facilitating better analysis and user experience.

Files changed (1) hide show
  1. global_func/load_contest_file.py +1 -1
global_func/load_contest_file.py CHANGED
@@ -134,7 +134,7 @@ def load_contest_file(upload, type, helper = None, sport = None, portfolio = Non
134
  elif sport == 'NAS':
135
  cleaned_df[['Remove', 'Guy', 'Dude', 'Pooba', 'Bub', 'Chief', 'Buddy']] = cleaned_df['Lineup'].str.split(',', expand=True)
136
  elif sport == 'CFB':
137
- cleaned_df[['Remove', 'QB', 'RB1', 'RB2', 'WR1', 'WR2', 'WR3', 'FLEX', 'S-FLEX']] = cleaned_df['Lineup'].str.split(',', expand=True)
138
  cleaned_df = cleaned_df.drop(columns=['Lineup', 'Remove'])
139
  entry_counts = cleaned_df['BaseName'].value_counts()
140
  cleaned_df['EntryCount'] = cleaned_df['BaseName'].map(entry_counts)
 
134
  elif sport == 'NAS':
135
  cleaned_df[['Remove', 'Guy', 'Dude', 'Pooba', 'Bub', 'Chief', 'Buddy']] = cleaned_df['Lineup'].str.split(',', expand=True)
136
  elif sport == 'CFB':
137
+ cleaned_df[['Remove', 'FLEX', 'QB', 'RB1', 'RB2', 'S-FLEX', 'WR1', 'WR2', 'WR3']] = cleaned_df['Lineup'].str.split(',', expand=True)
138
  cleaned_df = cleaned_df.drop(columns=['Lineup', 'Remove'])
139
  entry_counts = cleaned_df['BaseName'].value_counts()
140
  cleaned_df['EntryCount'] = cleaned_df['BaseName'].map(entry_counts)