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
Learn to push[CODE] before paste.
I think you can use itertools.islice to read from 16th value in the csv.reader. I mostly use manual split, strip routine instead of csv. If I had quoted values in files, then csv module would be good choice, otherwise I DIY. If you have choice, for me the best separator choice is semi comma.
pyTony
pyMod
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852