Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The CSV file delimiter found with csv.Sniffer() is interpreted incorrectly #119123

Open
Labels
stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error
@z-dava

Description

@z-dava

Bug report

Bug description:

Python script:

importcsvwithopen("file.csv")asf:dialect=csv.Sniffer().sniff(f.read(),delimiters=",;")print(dialect.delimiter)

file.csv:

id;has_data;has_info;is_sort;a;b;c;d;cost;group;sub_group;merge1;False;False;False;True;;;;62.25;['345'];['10'];UNKNOWN2;False;False;False;True;;;;54.00;['235'];['256'];UNKNOWN3;False;False;False;True;;;;237.00;['567'];['ALL'];UNKNOWN4;False;False;False;True;;;;46.50;['112', '112'];['765', '766'];UNKNOWN5;False;False;False;True;;;;237.00;['468'];['ALL'];UNKNOWN6;False;False;False;True;;;;13.27;['510'];['23'];UNKNOWN

It outputs, instead;

CPython versions tested on:

3.11

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp