I have a problem here, N files with 4 sheets, but i want just a specific sheet of each file that´s named "STD " and it´s the first sheet in every file.
Could u help me?
Follow the code...
# reading all the excel files
filenames = glob.glob(path + "\*.xlsx")
print('File names:', filenames)
# initializing empty data frame
finalexcelsheet = pd.DataFrame()
# to iterate excel file one by one
# inside the folder
for file in filenames:
# combining multiple excel worksheets
# into single data frames
df = pd.concat(pd.read_excel(file, sheet_name= 0), ignore_index=True, sort= True)
# appending excel files one by one
finalexcelsheet = finalexcelsheet.append(
df, ignore_index=True)
At the line: df = pd.concat(pd.read_excel(file, sheet_name= 0), ignore_index=True, sort= True)
It´s returning the error:
*Exception has occurred: TypeError first argument must be an iterable of pandas objects, you passed an object of type "DataFrame"
df = pd.concat(pd.read_excel(file, sheet_name= 0), ignore_index=True, sort= True)