James McCool
commited on
Commit
·
d9d478e
1
Parent(s):
dbc3f23
Enhance CSV file loading in load_dk_fd_file.py: update the read_csv function to include UTF-8 encoding for better compatibility with file objects provided by Streamlit.
Browse files
global_func/load_dk_fd_file.py
CHANGED
@@ -14,7 +14,8 @@ def load_dk_fd_file(lineups, csv_file):
|
|
14 |
# Now load and process the lineups file
|
15 |
try:
|
16 |
if '.csv' in lineups.name:
|
17 |
-
|
|
|
18 |
elif any(ext in lineups.name for ext in ['.xls', '.xlsx']):
|
19 |
lineups_df = pd.read_excel(lineups)
|
20 |
else:
|
|
|
14 |
# Now load and process the lineups file
|
15 |
try:
|
16 |
if '.csv' in lineups.name:
|
17 |
+
# Properly handle the file object that Streamlit provides
|
18 |
+
lineups_df = pd.read_csv(lineups, encoding='utf-8')
|
19 |
elif any(ext in lineups.name for ext in ['.xls', '.xlsx']):
|
20 |
lineups_df = pd.read_excel(lineups)
|
21 |
else:
|