Hi everyone,
I need to use python to read some data in my csv file, but the file I have contains 15 rows of introduction in front. all the data I need is from the row 16. I am able to read the data as the way I want it if I remove the first 15 rows, but it's very troublesome to do it every time and I have a lot of csv files like that.
so I want to know if there is a way to let python skip the first 15 rows just read from row 16?
below is my code
import csv
import time
import datetime
tempReadings = csv.reader(open('newdata3.csv','rb'),delimiter=',')
for reading in tempReadings:
print "got: %s" % reading
(timestamp, format, temp) = reading
print "timestamp: %s" % timestamp
print "temp: %s" % temp
Thanks