@@ -0,0 +1,1020 @@
+import os%0Aimport csv %0A%0Adelimiter = ','%0Aquote_character = '%22'%0A%0ADATADIR = %22%22%0ADATAFILE = %22beatles-diskography.csv%22%0A%0Adef parse_file(datafile):%0A    data = %5B%5D%0A                %0A    csv_fp = open(DATAFILE, 'rb')%0A    csv_reader = csv.DictReader(csv_fp, fieldnames=%5B%5D, restkey='undefined-fieldnames', delimiter=delimiter, quotechar=quote_character)%0A    %0A    current_row = 0%0A    for row in csv_reader:%0A        current_row += 1%0A        if current_row %3E 11:%0A            break%0A%09# Use heading rows as field names for all other rows.%0A        if current_row == 1:%0A            csv_reader.fieldnames = row%5B'undefined-fieldnames'%5D%0A            continue%0A%0A        print (csv_reader.fieldnames%5B0%5D+':',row%5B'Title'%5D,csv_reader.fieldnames%5B1%5D+':',row%5B'Released'%5D,csv_reader.fieldnames%5B2%5D+':',row%5B'Label'%5D,csv_reader.fieldnames%5B3%5D+':',row%5B'UK Chart Position'%5D,csv_reader.fieldnames%5B4%5D+':',row%5B'US Chart Position'%5D,csv_reader.fieldnames%5B5%5D+':',row%5B'BPI Certification'%5D,csv_reader.fieldnames%5B6%5D+':',row%5B'RIAA Certification'%5D)%0A        %0A    return data%0A

Create parsecsv.py