I've seen a few answers on reading multiple csv files into separate Pandas dataframes, and am still running into trouble. I've read my csv files and file names into a dictionary:
path = os.getcwd()
file_names = ['file1', 'thisisanotherfile', 'file3']
df_dict = {x: pd.read_csv('{}/{}.csv'.format(path, x)) for x in file_names}
Which seems to work: print(df_dict['file1'])
However what I'm looking for is a Pandas dataframe called 'file1' where I can access the data.
Is it possible to get this information from the dictionary? Do I have to call the dictionary in my code every time I want to access the data?