James McCool
commited on
Commit
·
44c87c6
1
Parent(s):
b8a722a
ping
Browse files- global_func/load_file.py +0 -2
global_func/load_file.py
CHANGED
|
@@ -90,11 +90,9 @@ sport_headers = {
|
|
| 90 |
def load_file(upload, site_var, type_var, sport_var, upload_type):
|
| 91 |
if upload is not None:
|
| 92 |
try:
|
| 93 |
-
# Check if upload is already a DataFrame (from database)
|
| 94 |
if isinstance(upload, pd.DataFrame):
|
| 95 |
df = upload.copy()
|
| 96 |
else:
|
| 97 |
-
# Handle file upload object
|
| 98 |
clean_name = re.sub(r' \(\d+\)', '', upload.name)
|
| 99 |
|
| 100 |
if clean_name.endswith('.csv'):
|
|
|
|
| 90 |
def load_file(upload, site_var, type_var, sport_var, upload_type):
|
| 91 |
if upload is not None:
|
| 92 |
try:
|
|
|
|
| 93 |
if isinstance(upload, pd.DataFrame):
|
| 94 |
df = upload.copy()
|
| 95 |
else:
|
|
|
|
| 96 |
clean_name = re.sub(r' \(\d+\)', '', upload.name)
|
| 97 |
|
| 98 |
if clean_name.endswith('.csv'):
|