def convert_csv_to_dict(data=DATA):
with open(data) as csvfile:
for row in csv.DictReader(csvfile.read().splitlines()):
name = re.sub(r'(.*?)\(.*', r'\1', row['name']).strip()
yield row
we need the splitlines
csv.DictReader(csvfile.read().splitlines())
Bob Belderbos
@bbelderbos
50 min left
If you get stuck on a method pass on to the next, they are independent
we will git push the solution branch at the end of the workshop :)