1 with open(filename) as newfile:
2 rows = csv.reader(newfile)
3 next(rows,None)
4 for row in rows:
5 print(row)
1with open("tmob_notcleaned.csv", "rb") as infile, open("tmob_cleaned.csv", "wb") as outfile:
2 reader = csv.reader(infile)
3 next(reader, None) # skip the headers
4 writer = csv.writer(outfile)
5 for row in reader:
6 # process each row
7 writer.writerow(row)
8
9# no need to close, the files are closed automatically when you get to this point.
10