Pythoon loop through several csv files
Posted on 2011-03-17
I have several (57) csv files. They are all setup with the same data structure. I want to loop through all files and if the value in column 3 is null/blank, I want save the value in column 1 to a file. I wrote the following to address this in one file, but how would I loop through all 57 files and save the output.
data = csv.reader(open('data.csv'))
fields = data.next()
for row in data:
if row == '':