appended_data = []
for infile in glob.glob("*.xlsx"):
data = pandas.read_excel(infile)
# store DataFrame in list
appended_data.append(data)
# see pd.concat documentation for more info
appended_data = pd.concat(appended_data)
# write DataFrame to an excel sheet
appended_data.to_excel('appended.xlsx')
import pandas as pd
import glob
f_list = glob.glob("C:Users*.xlsx")
#list comprehension
all_data = [pd.read_excel(f) for f in f_list]
#same like loops solution
all_data = []
for f in f_list:
df = pd.read_excel(f)
all_data.append(df)
df = pd.concat(all_data, axis=1)