I have a folder containing 3 csv files:
a.csv
b.csv
c.csv
To read all the csv's in this folder and create a dataframe, I'm currently doing this:
df1 = pd.read_csv('a.csv')
df2 = pd.read_csv('b.csv')
df3 = pd.read_csv('c.csv')
Is there any way to automate the naming of the dataframes (df1, df2 and df3) and reading of all the csv files in that folder. Say, I have 10 csv files, I don't want to manually write 10 read statements in pandas.
For example, I don't want to write this:
df1 = pd.read_csv('a.csv')
......
......
......
df10 = pd.read_csv('j.csv')
Thanks!