I am trying to import multiple CSV files into dictionary and then can access and send each cvs file to another function. I have this code:
def readfile():
path = '~/CSVFiles'
df = pd.DataFrame()
csvFiles = glob.glob(path + "/*.csv")
listoflist={}
for files in csvFiles:
csvlist=pd.read_csv(files)
listoflist[files]=csvlist
return listoflist
data=readfile()
for i in data
Bining_data(data[i]) # Bining is another function
##########
But, when I run this code I get error.