I will like to read multiple file but when I added a new column year, error message given: list object has no attribute 'Split'. I want to be the same this. Reference: I would like to have the same as this one
File Name: Shirt_2016, Shirt_2017, Shoe_2018, Shoe_2019,
All file names are standardized with this format, item_year.
import os
import glob
import pandas
import numpy
path='/Item/'
files = glob.glob(os.path.join(path,'*.xlsx'))
data = []
for filename in files:
df = pd.read_excel(filename,header=None)
data.append(df)
df=pd.concat(data)
df['Year']= os.path.basename(files.split('.')[0],split['_'][1]))
