Working on the NYC car crash dataset. The current csv has data from 2012 and I wanted to extract out the 2017 values. Thing is DATE is an object dtype and trying something like this ended up taking too long
data = data[(pd.to_datetime((data['DATE'])).dt.year == 2017)]
Here is how a sample of the data looks
Does anyone possibly know of a faster or more efficient way? Thank you.