James McCool
commited on
Commit
·
cee1912
1
Parent(s):
661cc5a
Enhance error handling in lineups DataFrame processing in load_dk_fd_file.py: add a try-except block around the column drop operation to prevent failures when attempting to remove specified columns, ensuring smoother data processing.
Browse files
global_func/load_dk_fd_file.py
CHANGED
|
@@ -20,8 +20,12 @@ def load_dk_fd_file(lineups, csv_file):
|
|
| 20 |
else:
|
| 21 |
st.error('Please upload either a CSV or Excel file for lineups')
|
| 22 |
return None, None
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
export_df = lineups_df.copy()
|
| 26 |
|
| 27 |
# Map the IDs to names
|
|
|
|
| 20 |
else:
|
| 21 |
st.error('Please upload either a CSV or Excel file for lineups')
|
| 22 |
return None, None
|
| 23 |
+
|
| 24 |
+
try:
|
| 25 |
+
lineups_df = lineups_df.drop(columns=['Entry ID', 'Contest Name', 'Contest ID', 'Entry Fee'])
|
| 26 |
+
except:
|
| 27 |
+
pass
|
| 28 |
+
|
| 29 |
export_df = lineups_df.copy()
|
| 30 |
|
| 31 |
# Map the IDs to names
|