James McCool
commited on
Commit
·
2ad75df
1
Parent(s):
906a851
Add debug print statements in load_contest_file.py for improved data visibility
Browse files- Introduced additional print statements to display the first 10 rows of cleaned_df after processing for both 'BASEBALL' and 'GOLF' sports, enhancing the debugging process during contest file loading.
- Maintained existing functionality while improving the visibility of data structures for better analysis and troubleshooting.
global_func/load_contest_file.py
CHANGED
@@ -120,6 +120,7 @@ def load_contest_file(upload, helper_var, helper = None, sport = None):
|
|
120 |
cleaned_df[['Remove', 'Guy', 'Dude', 'Pooba', 'Bub', 'Chief', 'Buddy']] = cleaned_df['Lineup'].str.split(',', expand=True)
|
121 |
elif sport == 'GOLF':
|
122 |
cleaned_df[['Remove', 'Guy', 'Dude', 'Pooba', 'Bub', 'Chief', 'Buddy']] = cleaned_df['Lineup'].str.split(',', expand=True)
|
|
|
123 |
cleaned_df = cleaned_df.drop(columns=['Lineup', 'Remove'])
|
124 |
entry_counts = cleaned_df['BaseName'].value_counts()
|
125 |
cleaned_df['EntryCount'] = cleaned_df['BaseName'].map(entry_counts)
|
@@ -129,6 +130,7 @@ def load_contest_file(upload, helper_var, helper = None, sport = None):
|
|
129 |
cleaned_df = cleaned_df[['BaseName', 'EntryCount', 'Guy', 'Dude', 'Pooba', 'Bub', 'Chief', 'Buddy']]
|
130 |
elif sport == 'GOLF':
|
131 |
cleaned_df = cleaned_df[['BaseName', 'EntryCount', 'Guy', 'Dude', 'Pooba', 'Bub', 'Chief', 'Buddy']]
|
|
|
132 |
|
133 |
print('Made it through check_lineups')
|
134 |
|
|
|
120 |
cleaned_df[['Remove', 'Guy', 'Dude', 'Pooba', 'Bub', 'Chief', 'Buddy']] = cleaned_df['Lineup'].str.split(',', expand=True)
|
121 |
elif sport == 'GOLF':
|
122 |
cleaned_df[['Remove', 'Guy', 'Dude', 'Pooba', 'Bub', 'Chief', 'Buddy']] = cleaned_df['Lineup'].str.split(',', expand=True)
|
123 |
+
print(cleaned_df.head(10))
|
124 |
cleaned_df = cleaned_df.drop(columns=['Lineup', 'Remove'])
|
125 |
entry_counts = cleaned_df['BaseName'].value_counts()
|
126 |
cleaned_df['EntryCount'] = cleaned_df['BaseName'].map(entry_counts)
|
|
|
130 |
cleaned_df = cleaned_df[['BaseName', 'EntryCount', 'Guy', 'Dude', 'Pooba', 'Bub', 'Chief', 'Buddy']]
|
131 |
elif sport == 'GOLF':
|
132 |
cleaned_df = cleaned_df[['BaseName', 'EntryCount', 'Guy', 'Dude', 'Pooba', 'Bub', 'Chief', 'Buddy']]
|
133 |
+
print(cleaned_df.head(10))
|
134 |
|
135 |
print('Made it through check_lineups')
|
136 |
|