Ninad077 commited on
Commit
b348229
·
verified ·
1 Parent(s): 0088b2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -72,14 +72,14 @@ if uploaded_files:
72
 
73
  elif uploaded_file.type == "application/vnd.ms-excel":
74
  # This is an .xls file
75
- if i == 0:
76
  # For the first file, include the header
77
- df = pd.read_excel(uploaded_file, engine='xlrd')
78
- # Store the columns from the first file
79
- headers = df.columns
80
- else:
81
- # For subsequent files, set the header using the stored headers
82
- df = pd.read_excel(uploaded_file, names=headers, header=0, engine='xlrd')
83
 
84
  # Add a column for the file name
85
  df['file_name'] = file_name
 
72
 
73
  elif uploaded_file.type == "application/vnd.ms-excel":
74
  # This is an .xls file
75
+ if i == 0:
76
  # For the first file, include the header
77
+ df = pd.read_excel(uploaded_file, engine='xlrd')
78
+ # Store the columns from the first file
79
+ headers = df.columns
80
+ else:
81
+ # For subsequent files, set the header using the stored headers
82
+ df = pd.read_excel(uploaded_file, names=headers, header=0, engine='xlrd')
83
 
84
  # Add a column for the file name
85
  df['file_name'] = file_name