I think that would be better handled in csv.DictReader