I have a list with different csv files, what I would like to do is read these csv files and save in a variable for posterior operations.
This is what I have now
DF_list= list()
for filename in sorted(glob.glob(dirname + '/*.csv')):
print(filename)
df7 = pd.read_csv(filename)
DF_list.append(df7)
And I want to make something like this, How can I do this?
df1 = pd.read_csv(DF_list[0])
df2 = pd.read_csv(DF_list[1])
df3 = pd.read_csv(DF_list[2])
>> ValueError: Invalid file path or buffer object type: <class 'pandas.core.frame.DataFrame'>
Thanks for your help!