James McCool
commited on
Commit
·
f55422b
1
Parent(s):
637112e
Add debug output for cleaned lineup in load_contest_file function
Browse files- Introduced a print statement to display the cleaned 'Lineup' column after processing, aiding in debugging and verification of data transformations.
- This change supports ongoing efforts to enhance data handling and improve user experience within the application.
global_func/load_contest_file.py
CHANGED
@@ -42,6 +42,7 @@ def load_contest_file(upload, sport):
|
|
42 |
# Create the cleaned dataframe with just the essential columns
|
43 |
cleaned_df = df[['BaseName', 'EntryCount', 'Lineup']]
|
44 |
cleaned_df['Lineup'] = cleaned_df['Lineup'].replace(pos_list, value=',', regex=True)
|
|
|
45 |
cleaned_df[['Remove', '1B', '2B', '3B', 'C', 'OF1', 'OF2', 'OF3', 'P1', 'P2', 'SS']] = cleaned_df['Lineup'].str.split(',', expand=True)
|
46 |
cleaned_df = cleaned_df.drop(columns=['Lineup', 'Remove'])
|
47 |
cleaned_df = cleaned_df[['BaseName', 'EntryCount', 'P1', 'P2', 'C', '1B', '2B', '3B', 'SS', 'OF1', 'OF2', 'OF3']]
|
|
|
42 |
# Create the cleaned dataframe with just the essential columns
|
43 |
cleaned_df = df[['BaseName', 'EntryCount', 'Lineup']]
|
44 |
cleaned_df['Lineup'] = cleaned_df['Lineup'].replace(pos_list, value=',', regex=True)
|
45 |
+
print(cleaned_df['Lineup'])
|
46 |
cleaned_df[['Remove', '1B', '2B', '3B', 'C', 'OF1', 'OF2', 'OF3', 'P1', 'P2', 'SS']] = cleaned_df['Lineup'].str.split(',', expand=True)
|
47 |
cleaned_df = cleaned_df.drop(columns=['Lineup', 'Remove'])
|
48 |
cleaned_df = cleaned_df[['BaseName', 'EntryCount', 'P1', 'P2', 'C', '1B', '2B', '3B', 'SS', 'OF1', 'OF2', 'OF3']]
|