Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
read a large csv file and subset on datetime column
from dateutil.parser import parse
with open('data.csv') as fin:
for line in csv.reader(fin):
date1 = parse(row[1])
date2 = - timedelta(days=3)
if date1 > date2:
process(row) # whatever your logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.