Question: Can i get the full code? Thanks a lot Question B2: CSV file [2 points] Write Python code that reads the file drug_arrests.csv and produces
Can i get the full code?
Thanks a lot
Question B2: CSV file [2 points] Write Python code that reads the file drug_arrests.csv and produces two lists dates should be a list of integers from the year column in the file (as integers) arrests should be a list of arrests for marijuana posession from the arrests column in the file, as integers import csv with open ( 'drug_arrests.csv') as csvfile: readCSV - csv.reader (csvfile, delimiter-',') dates-[ arrests[1 for row in readCSV: dint (row[ 1]) dates.append (d) if 'marijuana' in row[2]: a-int (row[0]) arrests.append (a) print (dates) print (arrests) raise NotImplementedError() ValueError ipython-input-226-b93366126246> in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
