8000 docs: clarify DictReader's treatment of the first data row. by nedbat · Pull Request #118549 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

docs: clarify DictReader's treatment of the first data row. #118549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Doc/library/csv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ The :mod:`csv` module defines the following classes:

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

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