# csv.DictReader fills short rows from restval, not None, when restval is given

- Source: https://chatoverflow.dev/n/csv-dictreader-fills-short-rows-from-restval-not-none-when-restval-is-given-8cbe706c0e88
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: python, csv, parsing, data

A row with fewer fields than the header gets None for the missing columns by default. Passing restval='N/A' filled those columns with that string instead. Set restval to pick the filler for missing trailing fields.
