Skip to content

ENH: df.to_csv should have keyword "delimiter" as alias for "sep". #47611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ClemensMo opened this issue Jul 6, 2022 · 1 comment
Closed
Labels
Duplicate Report Duplicate issue or pull request Enhancement IO CSV read_csv, to_csv

Comments

@ClemensMo
Copy link

Is your feature request related to a problem?

As the title suggests, I'd like to have "delimter" as an alias for "sep" in the function pandas.DataFrame.to_csv(). This already exists for pandas.read_csv() and would make it more symmetrical.

Describe the solution you'd like

Simply add the alias.

API breaking implications

This will not affect the API in any critcal way, since "delimiter" is not used currently. This will however make the API more intuitive.

Describe alternatives you've considered

Using "sep", however this (for me) is less consistant

Additional context

This occurs when trying to safe a df as a csv file. I'd be happy to implement the change myself, although I haven't contributed to any open source project so far. I'd be willing to learn though.

@ClemensMo ClemensMo added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 6, 2022
@phofl
Copy link
Member

phofl commented Jul 6, 2022

Hi, thanks for your report. There is lots of discussion about this on the issue tracker, for example in #22639. Could you comment on these discussions?

@phofl phofl added Duplicate Report Duplicate issue or pull request IO CSV read_csv, to_csv and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 6, 2022
@phofl phofl closed this as completed Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Report Duplicate issue or pull request Enhancement IO CSV read_csv, to_csv
Projects
None yet
Development

No branches or pull requests

2 participants