1df = pd.concat(pd.read_excel(workbook_url, sheet_name=None), ignore_index=True)
1import glob
2
3all_data = pd.DataFrame()
4path = 'd:/projects/chassis/data/*.xlsx'
5for f in glob.glob(path):
6 df = pd.read_excel(f, sheet_name=None, ignore_index=True, skiprows=6, usecols=8)
7 cdf = pd.concat(df.values())
8 all_data = all_data.append(cdf,ignore_index=True)
9print(all_data)
1import os
2import pandas as pd
3cwd = os.path.abspath('')
4files = os.listdir(cwd)
5df = pd.DataFrame()
6for file in files:
7 if file.endswith('.xlsx'):
8 df = df.append(pd.read_excel(file), ignore_index=True)
9df.head()
10df.to_excel('total_sales.xlsx')