1👍
✅
You are using a DictReader
– hence you should use keys to access the fields, not indexes. In other words, row
is a dictionary:
for row in records:
print(row['my_field_name'])
Source:stackexchange.com