Update util.py
Browse files
util.py
CHANGED
@@ -17,11 +17,11 @@ def read_file(file_path):
|
|
17 |
|
18 |
result = ""
|
19 |
|
20 |
-
if ext ==
|
21 |
result = pd.read_csv(file_path)
|
22 |
-
elif ext in (
|
23 |
result = pd.read_excel(file_path)
|
24 |
-
elif ext in (
|
25 |
result = pd.read_json(file_path)
|
26 |
|
27 |
return result
|
|
|
17 |
|
18 |
result = ""
|
19 |
|
20 |
+
if ext == ".csv":
|
21 |
result = pd.read_csv(file_path)
|
22 |
+
elif ext in (".xls", ".xlsx"):
|
23 |
result = pd.read_excel(file_path)
|
24 |
+
elif ext in (".json", ".jsonl"):
|
25 |
result = pd.read_json(file_path)
|
26 |
|
27 |
return result
|