James McCool commited on
Commit
b7058ba
·
1 Parent(s): 24a2017

Add debug output for cleaned DataFrame in load_contest_file function

Browse files

- Introduced a print statement to display the first 10 rows of the cleaned DataFrame, enhancing visibility into the data being processed.
- Maintained existing functionality while improving debugging capabilities for data loading operations.

Files changed (1) hide show
  1. global_func/load_contest_file.py +1 -0
global_func/load_contest_file.py CHANGED
@@ -80,6 +80,7 @@ def load_contest_file(upload, helper = None, sport = None):
80
  cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' F ', 'F '], value=',', regex=True)
81
  elif sport == 'GOLF':
82
  cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' G ', 'G '], value=',', regex=True)
 
83
  check_lineups = cleaned_df.copy()
84
  if sport == 'MLB':
85
  cleaned_df[['Remove', '1B', '2B', '3B', 'C', 'OF1', 'OF2', 'OF3', 'P1', 'P2', 'SS']] = cleaned_df['Lineup'].str.split(',', expand=True)
 
80
  cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' F ', 'F '], value=',', regex=True)
81
  elif sport == 'GOLF':
82
  cleaned_df['Lineup'] = cleaned_df['Lineup'].replace([' G ', 'G '], value=',', regex=True)
83
+ print(cleaned_df.head(10))
84
  check_lineups = cleaned_df.copy()
85
  if sport == 'MLB':
86
  cleaned_df[['Remove', '1B', '2B', '3B', 'C', 'OF1', 'OF2', 'OF3', 'P1', 'P2', 'SS']] = cleaned_df['Lineup'].str.split(',', expand=True)