1👍
✅
Use csv.DictReader instead of csv.reader
. With the fieldnames
parameter omitted, the first row of the file will be used to determine field names.
Source:stackexchange.com