Python 3.13.6 (tags/v3.13.6:4e66535, Aug 6 2025, 14:36:00) [MSC v.1944 64 bit (AMD64)] on win32 Enter "help" below or click "Help" above for more information. d['1/1/2025'] = 1 Traceback (most recent call last): File "", line 1, in d['1/1/2025'] = 1 NameError: name 'd' is not defined. Did you mean: 'id'? d = {} d['1/1/2025'] = 1 d {'1/1/2025': 1} d['1/1/2025'] += 1 d {'1/1/2025': 2} d['1/2/2025'] += 1 Traceback (most recent call last): File "", line 1, in d['1/2/2025'] += 1 KeyError: '1/2/2025' d['1/2/2025'] = 1 d {'1/1/2025': 2, '1/2/2025': 1} Python 3.13.6 (tags/v3.13.6:4e66535, Aug 6 2025, 14:36:00) [MSC v.1944 64 bit (AMD64)] on win32 Enter "help" below or click "Help" above for more information. d['1/1/2025'] = 1 Traceback (most recent call last): File "", line 1, in d['1/1/2025'] = 1 NameError: name 'd' is not defined. Did you mean:line = '13266225,1/1/2025,0,13C,Intimidation,1,Beat 14D40,"Residence, Home (Includes Apartment)",5134,DENORON,DR,,HOUSTON,77048,-95.346824,29.638189' 'id'?Enter "help" below or click "Help" above for more information. d['1/1/2025'] = 1 Traceback (most recent call last): File "", line 1, in d['1/1/2025'] = 1 NameError: name 'd' is not defined. Did you mean: 'id'? SyntaxError: invalid syntax line = '13266225,1/1/2025,0,13C,Intimidation,1,Beat 14D40,"Residence, Home (Includes Apartment)",5134,DENORON,DR,,HOUSTON,77048,-95.346824,29.638189' line SyntaxError: multiple statements found while compiling a single statement line Traceback (most recent call last): File "", line 1, in line NameError: name 'line' is not defined. Did you mean: 'slice'? line = '13266225,1/1/2025,0,13C,Intimidation,1,Beat 14D40,"Residence, Home (Includes Apartment)",5134,DENORON,DR,,HOUSTON,77048,-95.346824,29.638189' line '13266225,1/1/2025,0,13C,Intimidation,1,Beat 14D40,"Residence, Home (Includes Apartment)",5134,DENORON,DR,,HOUSTON,77048,-95.346824,29.638189' line.split(,) SyntaxError: invalid syntax line.split(',') ['13266225', '1/1/2025', '0', '13C', 'Intimidation', '1', 'Beat 14D40', '"Residence', ' Home (Includes Apartment)"', '5134', 'DENORON', 'DR', '', 'HOUSTON', '77048', '-95.346824', '29.638189'] line.split(',')[1] '1/1/2025' def get_date(line): return line.split(',')[1] get_date get_date(line) '1/1/2025' line2 = '5088925,1/1/2025,0,13C,Intimidation,1,Beat 16E10,"Residence, Home (Includes Apartment)",935,STAFFORDALE ' line2 '5088925,1/1/2025,0,13C,Intimidation,1,Beat 16E10,"Residence, Home (Includes Apartment)",935,STAFFORDALE ' get_date(line2) '1/1/2025' def get_type(line): """ Get the incident class from a line in NIBRS file, a csv file. The date is the value of column #5. """ return line.split(',')[4] get_type(line) 'Intimidation'