I asked this question yesterday but am still stuck on it. I\'ve written a function that currently reads a file correctly but there are a couple of problems.
The main
This should simplify your code a bit, however I have left dealing with the header row up to you.
from collections import defaultdict
import csv
artists = defaultdict(list)
with open('artists.csv', 'r') as csvfile:
reader = csv.reader(csvfile,delimiter=',')
for row in reader:
artists[row[0]].append(row[1:-1])