I have a list 'filenames' which correspond to the .csv files I want to read.
filenames = ['filename_1', 'filename_2', ..., 'filename_n']
for file in filenames:
file_address = '{}{}'.format(file, '.csv')
file = pd.read_csv(file_address)
display(file.info())
Desired outcome:
I would like to create a variable with the name corresponding to the file it read.
type(filename_1)
pandas.core.frame.DataFrame
I will appreciate it if you tell me how to Google it or if you can provide me an example of how to archive this.