Im using the pythons csv reader . How can I use the following code in such a way that it ignores blank lines.
import csv f1 = open (\"ted.csv\") oldFile1 = c
If your csv files start with a blank line, I think you should be able to skip that line with readline() before creating the csv reader:
readline()
with open("ted.csv") as f1, open("ted2.csv") as f2, open('foo.csv', 'w') as out: f1.readline() f2.readline() r1, r2 = csv.reader(f1), csv.reader(f2)