bstraehle commited on
Commit
6e8d8d1
·
verified ·
1 Parent(s): 04a6068

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -8
utils.py CHANGED
@@ -24,17 +24,12 @@ def read_file_json(file_path):
24
 
25
  df = None
26
 
27
- print("111")
28
- if is_ext(file_path, "csv"):
29
  df = pd.read_csv(file_path)
30
- print("csv")
31
- elif is_ext(file_path, "xls") or is_ext(file_path, "xlsx"):
32
  df = pd.read_excel(file_path)
33
- print("xls")
34
- elif is_ext(file_path, "json") or is_ext(file_path, "jsonl"):
35
  df = pd.read_json(file_path)
36
- print("json")
37
- print("222")
38
 
39
  return "" if df is None else df.to_json()
40
 
 
24
 
25
  df = None
26
 
27
+ if is_ext(file_path, ".csv"):
 
28
  df = pd.read_csv(file_path)
29
+ elif is_ext(file_path, ".xls") or is_ext(file_path, ".xlsx"):
 
30
  df = pd.read_excel(file_path)
31
+ elif is_ext(file_path, ".json") or is_ext(file_path, ".jsonl"):
 
32
  df = pd.read_json(file_path)
 
 
33
 
34
  return "" if df is None else df.to_json()
35