0xrsydn commited on
Commit
54ca818
·
verified ·
1 Parent(s): cca7719

Update ai_agent.py

Browse files
Files changed (1) hide show
  1. ai_agent.py +2 -2
ai_agent.py CHANGED
@@ -33,8 +33,8 @@ def pandas_agent(file, agent_input):
33
  # Check if the file extension is CSV
34
  if file.endswith('.csv'):
35
  df = pd.read_csv(file)
36
- # Check if the file extension is XLS or XLSX
37
- elif file.endswith('.xls') or file.endswith('.xlsx'):
38
  df = pd.read_excel(file)
39
  else:
40
  return "Unsupported file format. Only CSV, XLS, or XLSX files are supported."
 
33
  # Check if the file extension is CSV
34
  if file.endswith('.csv'):
35
  df = pd.read_csv(file)
36
+ # Check if the file extension is XLSX or XLS
37
+ elif file.endswith('.xlsx') or file.endswith('.xls'):
38
  df = pd.read_excel(file)
39
  else:
40
  return "Unsupported file format. Only CSV, XLS, or XLSX files are supported."