A robot-support CSV review can lose a column's identity before any numeric range check runs. If two column headings are identical, a dictionary has only one place for that name. An import that immediately turns the row into a mapping can therefore hide an earlier value even when the header and data row contain the same number of fields.
An original offline fixture isolates this case using three columns and one invented record. It reads no equipment data and sends no settings to a controller. The local interpreter reports Python 3.14.7; the official Python reference pages displayed 3.14.10 when checked.
Start with positions before assigning names
The complete synthetic CSV has the header axis_id,reading,reading and a second line J3,12,98. The labels and numbers have no assigned physical units or connection to an actual joint. Both lines contain three fields, and the repeated heading is intentional.
Reading this text with csv.reader and strict=True returns two lists. The header list retains reading twice. The data list retains J3, 12, and 98 as three separate strings in their original positions. At this stage, the first and second reading columns are still distinguishable by position.
That positional observation supplies a useful control. The source has not omitted the value 12, and the ordinary row parser has not removed it. A later representation can be compared against those original lists without assuming that a successful parse preserved every column name separately.
Observe the dictionary projection
The same text is passed to csv.DictReader with strict=True and a restkey explicitly named EXTRA. Its fieldnames attribute still contains all three header entries, including the repeated reading name. The returned data row, however, contains only two keys: axis_id maps to J3, and reading maps to 98.
The earlier string 12 has no separate entry in that dictionary. EXTRA is absent. This is an executed result for the stated fixture and interpreter, not a hypothetical parser warning or a claim that all CSV consumers behave identically.
The csv reference describes DictReader's mapping from fields to dictionary keys and its separate accommodation for extra row fields. Here, neither line is wider than the other. Comparing row width with header width would pass this fixture while leaving the duplicate-name problem unresolved. [Python csv reference](https://docs.python.org/3.14/library/csv.html).
Connect the result to dictionary construction
The checked CPython 3.14 implementation constructs the mapping by pairing fieldnames with row values and passing those pairs to dict. The dictionary reference explains how repeated keys in that constructor retain the later corresponding value. Together, these sources explain why the second reading value occupies the single reading entry in this test. [CPython csv implementation](https://github.com/python/cpython/blob/3.14/Lib/csv.py), [Python dictionary reference](https://docs.python.org/3.14/library/stdtypes.html#mapping-types-dict).
This explanation concerns the mapping step. It does not establish whether the upstream exporter intended two different signals, accidentally repeated a heading, or deliberately used a format with duplicate names. Those interpretations require a separate producer contract.
Use controls that expose hidden information
A second fixture reverses the two reading values, producing J3,98,12. DictReader then returns reading equal to the string 12. The result follows the later column rather than selecting the largest value, adding the readings, or preserving a list of both values.
A third fixture uses J3,12,12. Its dictionary still contains only two keys. Equal source values make the loss less visible in a casual display, but they do not create two independently addressable reading fields. Testing only examples in which duplicate columns agree would miss this distinction.
Finally, the control header axis_id,reading_a,reading_b produces three dictionary entries for the original J3,12,98 row. This shows how distinct synthetic names preserve both values in this mapping. It does not authorize renaming an actual export without checking what each column means.
Check the header before accepting records
The demonstration gate first reads a header as a positional list. It collects every repeated exact name along with its zero-based positions. For the supplied header, the report identifies reading at positions one and two. It then raises ValueError before appending any data row to its accepted-record list.
The recorded accepted list is empty. That is a result of this explicitly written gate, not a built-in guarantee supplied by strict=True. The baseline DictReader fixture used strict=True and still produced the two-key mapping without a csv.Error.
An application could instead retain positional rows until an operator resolves the schema. Either approach needs a declared policy for duplicate headings. Silently adding suffixes may invent meanings that the producer never specified; silently keeping one value conceals the unresolved choice.
Keep exact names and application names separate
This fixture checks exact header strings. It does not trim whitespace, fold case, translate units, resolve aliases, or normalize Unicode. If a downstream application performs any such transformation, distinct source headings could become equal later. That application would need to check its own resulting names as well.
Header uniqueness also does not prove a valid data row. Missing fields, extra fields, required columns, type conversion, physical units, and equipment compatibility remain separate checks. The point here is narrower: matching widths and successful dictionary creation do not demonstrate that each source column retained a distinct identity.
Retain evidence before the projection
A review receipt should retain the original CSV identity, complete header sequence, duplicate positions, positional fixture rows, parser options, and the resulting mapping or explicit rejection. Capturing those items before discarding positions makes it possible to explain which information survived the conversion.
Sources were checked November 19, 2026 UTC. All record values, controls, and gate results are original offline editorial work. The accompanying AI-generated illustration contrasts three positional fields with a two-key mapping; it is not an actual robot telemetry screen or evidence that any production file was repaired.