I am trying to read a number of CSV files into arrays like
for files in folder:
with open(files) as f:
df = pd.read_csv(f)
result = function(df)
print result
The problem is this only reads a file at a time not multiple files. My aim is to pass each of these dataframes through a function and create an output for each dataframe. The function is done, all I need to do is read these files into separate dataframes. Is there a method to doing this?
df1,...dfNusing aforloop?df[0], df[1], .. df[N-1]for i in range(len(folder)): df_%i = pd.DataFrame() % iso I can then save my CSVs or output in these dataframesdf[i] = pd.DataFrame()