Skip to content
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

[BUG] API mismatch - DataFrame.to_csv line_terminator vs pandas' lineterminator #12894

Closed
mattf opened this issue Mar 7, 2023 · 2 comments · Fixed by #12896
Closed

[BUG] API mismatch - DataFrame.to_csv line_terminator vs pandas' lineterminator #12894

mattf opened this issue Mar 7, 2023 · 2 comments · Fixed by #12896
Assignees
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@mattf
Copy link

mattf commented Mar 7, 2023

Describe the bug
writing code with import cudf as pd

Steps/Code to reproduce bug

pandas to_csv uses lineterminator

cudf to_csv uses line_terminator

Expected behavior
cudf to_csv to accept lineterminator

https://github.com/rapidsai/cudf/blob/branch-23.02/python/cudf/cudf/io/csv.py#L158

@mattf mattf added Needs Triage Need team to review and classify bug Something isn't working labels Mar 7, 2023
@wence- wence- self-assigned this Mar 7, 2023
@wence-
Copy link
Contributor

wence- commented Mar 7, 2023

Note that pandas < 1.5 used line_terminator (see https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html#pandas.DataFrame.to_csv). Pandas 1.5 will accept line_terminator and produce a deprecation warning, pandas 2 removes line_terminator.

So we should deprecate line_terminator in 23.04, accept lineterminator and drop line_terminator in 23.06.

@wence- wence- added pandas Python Affects Python cuDF API. and removed Needs Triage Need team to review and classify labels Mar 7, 2023
@galipremsagar
Copy link
Contributor

So we should deprecate line_terminator in 23.04, accept lineterminator and drop line_terminator in 23.06.

+1

wence- added a commit to wence-/cudf that referenced this issue Mar 7, 2023
Pandas 1.5 deprecated line_terminator in favour of lineterminator (to
align with read_csv), and removed it in 2.0. Align the cuDF API by
preferring lineterminator and providing a deprecation warning for use
of line_terminator. Closes rapidsai#12894.
rapids-bot bot pushed a commit that referenced this issue Mar 8, 2023
…12896)

Pandas 1.5 deprecated line_terminator in favour of lineterminator (to align with read_csv), and removed it in 2.0. Align the cuDF API by preferring lineterminator and providing a deprecation warning for use of line_terminator. Closes #12894.

Authors:
  - Lawrence Mitchell (https://github.com/wence-)
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)
  - Bradley Dice (https://github.com/bdice)

URL: #12896
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants