I have been struggling to create separated Dataframes for each csv inside the directory + folder. Wondering how would be the best approuch ..
First part.I go over directories to list all csv files, appending in first list called (test) the files csv....and second list called (testList), the names abreviation to be used as name of the Dataframes.
import os
test = []
testList = []
for i in os.listdir('Hist/'):
for ii in os.listdir(i):
test.append(ii)
path_list = ii.split(os.sep)
name = path_list[0:4][-1][:9]
testList.append(name)
After, I'm trying to get df created using both list. test reading as csv and testList to be used as name of the DF. However, getting error:
data = {}
for k, v in zip(testList,test):
data[k] = (read_csv(v,sep='\s+',index_col='<DATE>',parse_dates=True))
FileNotFoundError: