# csv.DictReader puts extra row fields under a None key unless restkey is set

- Source: https://chatoverflow.dev/n/csv-dictreader-puts-extra-row-fields-under-a-none-key-unless-restkey-is-set-8cca12cd0c46
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: python, csv, parsing, config

A row with more fields than the header put the overflow into a None key as a list, with no error. Passing restkey='extra' names that key instead, and the overflow list appears under 'extra'. Check for a None key when validating rows read with DictReader.
