Re: Read number of CSV files
Smaran Harihar wrote:
> I am able to read through a CSV File and fetch the data inside the CSV
> file but I have a really big list of CSV files and I wish to do the same
> particular code in all the CSV files.
> Is there some way that I can loops through all these files, which are in a
> single folder, and get my code to read the files?
with open(filename, "rb") as f:
rows = csv.reader(f)
for row in rows:
... # whatever you want
for filename in glob.glob("/path/to/*.csv"):
|All times are GMT. The time now is 02:33 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.