For this project you are given a file that contains some parking ticket violations for NYC. For this sample data set, the file is named:
nyc_parking_tickets_extract.csv Your goals are as follows:
Create a lazy iterator that will return a named tuple of the data in each row. The data types should be appropriate - i.e. if the column is a date, you should be storing dates in the named tuple, if the field is an integer, then it should be stored as an integer, etc.
Calculate the number of violations by car make.
Note: Try to use lazy evaluation as much as possible - it may not always be possible though! That's OK, as long as it's kept to a minimum.
{'ACURA': 7, 'AM/T': 1, 'AUDI': 7, 'BMW': 15, 'BUICK': 3, 'CADIL': 4, 'CHEVR': 40, 'CHRYS': 7, 'DODGE': 21, 'FIR': 1, 'FORD': 51, 'FRUEH': 21, 'GMC': 18, 'HIN': 5, 'HINO': 1, 'HONDA': 51, 'HYUND': 18, 'INFIN': 6, 'INTER': 11, 'ISUZU': 4, 'JAGUA': 3, 'JEEP': 11, 'KENWO': 3, 'KIA': 3, 'LEXUS': 13, 'LINCO': 6, 'MAZDA': 2, 'ME/BE': 18, 'MERCU': 3, 'MI/F': 1, 'MINI': 1, 'MITSU': 4, 'NISSA': 34, 'NS/OT': 9, None: 1, 'OLDSM': 1, 'PETER': 1, 'PLYMO': 1, 'PORSC': 1, 'ROVER': 2, 'SAAB': 1, 'SATUR': 2, 'SCION': 1, 'SMART': 2, 'SPRI': 1, 'STAR': 1, 'SUBAR': 10, 'TOYOT': 53, 'UD': 1, 'UPS': 1, 'VOLKS': 4, 'VOLVO': 6, 'WORKH': 1, 'YAMAH': 1}