I have ~ 200,000 rows in a csv file that I need to parse. They are
time stamped and are supposed to all be 10 minutes apart from each
other. The format of the file is:
I need to iterate through all of these and mark the ones that have
more than 10 minutes between them.
I'm thinking to loop through the file and convert each time stamp to a
DateTime with something like:
previous = DateTime.strptime(thefile[i-1], "%m/%d/%Y %H:%M")
current = DateTime.strptime(thefile[i], "%m/%d/%Y %H:%M")
I then could do something like:
diff = current - previous
and check to see whether diff is greater than 10 minutes -- if so,
then do the processing that I need to do.
It appears that diff returns as something like Rational(1, 48). I'm
not sure what to do with that.
Any suggestions on how to move forward with this and check for the 10