Skip to content

lineterminator in to_csv doesn't work #8206

Closed
@cpcloud

Description

@cpcloud
In [3]: df = pd.DataFrame({'a': ['3.4', '34.400'], 'b': ['5,5', '10,200']})

In [4]: df
Out[4]:
        a       b
0     3.4     5,5
1  34.400  10,200

In [5]: df.to_csv(lineterminator='-')
Out[5]: ',a,b\n0,3.4,"5,5"\n1,34.400,"10,200"\n'

I would've expected

Out[5]: ',a,b-0,3.4,"5.5"-1,34.400,"10,200"-'

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