Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Multiple excel files to single df

import glob

all_data = pd.DataFrame()
path = 'C:UsersAdminDesktopNotebookWeek 38 Trip Data*.xlsx'
for f in glob.glob(path):
    df = pd.read_excel(f, sheet_name=None)
    cdf = pd.concat(df.values())
    all_data = (all_data.append(cdf,ignore_index=True))
Source by pythonbasics.org #
 
PREVIOUS NEXT
Tagged: #Multiple #excel #files #single #df
ADD COMMENT
Topic
Name
9+1 =