-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Closed
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
The code:
Line 473 in 719e5c3
if checked > 20:
The docs:
- https://docs.python.org/3/library/csv.html#csv.Sniffer.has_header
Line 297 in 379161d
Twenty rows after the first row are sampled; if more than half of columns +
Twenty rows after the first row are sampled
This is an off-by-one: the code iterates 21 rows, not 20.
I err on correcting the docs, instead of the code, given that users may rely on the current behavior.
Linked PRs
- gh-137952: update
csv.Sniffer().has_header()docs to describe the actual off-by-onish behavior #137953 - [3.14] gh-137952: update
csv.Sniffer().has_header()docs to describe the actual off-by-onish behavior (GH-137953) #141434 - [3.13] gh-137952: update
csv.Sniffer().has_header()docs to describe the actual off-by-onish behavior (GH-137953) #141435
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Projects
Status
Done
Status
Todo