Skip to content

csv.Sniffer().has_header() checks 21, not 20 rows, contrary to what the docs say #137952

@maurycy

Description

@maurycy

The code:

The docs:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    No status

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions