X Tutup
The Wayback Machine - https://web.archive.org/web/20251210232503/https://github.com/python/cpython/issues/102386
Skip to content

csv sniffer thinks there is no headerÂ?#102386

@tooptoop4

Description

@tooptoop4

file with:

col1,col2,col3
1,2,3
a,b,c
A,B,C
22,22,12
with open('test.csv', 'r') as file:
     data = file.read()
import csv
ader = csv.Sniffer().has_header(data)
print(ader)

gives False but expecting True

python 3.10.9

Metadata

Metadata

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    X Tutup