I want to single out all the data from 2020 in a dataset. The date is formatted like this: 06/10/2011 06:47:44 PM
I tried this out just to see if I could single out the data and count it, but it didn't work:
count = 0
d2020 = data311['Created Date'][6][-13]
for d in d2020:
if d == '2020':
count += 1
print(count)
It runs but doesn't return anything, if that makes sense. I've tried other ways, but the only difference is that it'll return 0, which is obviously incorrect.
I'm not actually trying to count the data from 2020, I just want to use only 2020 data to be able to plot it on a map.
This is the dataset: https://data.cityofnewyork.us/Social-Services/311-Noise-Complaints/p5f6-bkga