8000 docs: clarify csv.DictReader's treatment of the first data row (#118549) · python/cpython@9d67b72 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d67b72

Browse files
authored
docs: clarify csv.DictReader's treatment of the first data row (#118549)
1 parent 608192e commit 9d67b72

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/library/csv.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ The :mod:`csv` module defines the following classes:
156156

157157
The *fieldnames* parameter is a :term:`sequence`. If *fieldnames* is
158158
omitted, the values in the first row of file *f* will be used as the
159-
fieldnames. Regardless of how the fieldnames are determined, the
160-
dictionary preserves their original ordering.
159+
fieldnames and will be omitted from the results. If
160+
*fieldnames* is provided, they will be used and the first row will be
161+
included in the results. Regardless of how the fieldnames are determined,
162+
the dictionary preserves their original ordering.
161163

162164
If a row has more fields than fieldnames, the remaining data is put in a
163165
list and stored with the fieldname specified by *restkey* (which defaults

0 commit comments

Comments
 (0)
0