Dynamically Read Csv Files Python Pandas
I would like to iteratively read data from a set of csv files in a for loop. The csv files are named (1.csv, 2.csv and so on) The normal way to read the data will be data = pd.re
Solution 1:
Use either percent formatting
pd.read_csv('%d.csv' % i)
or format
pd.read_csv('{0}.csv'.format(i))
Post a Comment for "Dynamically Read Csv Files Python Pandas"