Skip to content

DOC, BUG: Clarify and Standardize Whitespace Delimiter Behaviour with Custom Line Terminator #12912

Closed
@gfyoung

Description

@gfyoung
>>> from pandas import read_csv
>>> from pandas.compat import StringIO
>>> data = """a b c~1 2 3~4 5 6~7 8 9"""
>>> df = read_csv(StringIO(data), lineterminator='~', delim_whitespace=True)
>>> df
Empty DataFrame
Columns: [a, b, c~1, 2, 3~4, 5, 6~7, 8, 9]
Index: []

expected:

>>> df
    a    b    c
0   1    2    3
1   4    5    6
2   7    8    9

Note that this bug is only for the C engine, as the Python engine does not yet support delim_whitespace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions