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] cudf doesn't raise when join would introduce duplicate column names #17902

Closed
MarcoGorelli opened this issue Feb 3, 2025 · 0 comments · Fixed by #17905
Closed

[BUG] cudf doesn't raise when join would introduce duplicate column names #17902

MarcoGorelli opened this issue Feb 3, 2025 · 0 comments · Fixed by #17905
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@MarcoGorelli
Copy link
Contributor

MarcoGorelli commented Feb 3, 2025

Describe the bug
A clear and concise description of what the bug is.

Steps/Code to reproduce bug
Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.

import cudf
df = cudf.DataFrame({'a':[1,2,3,4,5],'b':[6,6,6,6,6]})
df.merge(df, on=['a'], suffixes=("", '_right')).merge(df, on=['a'], suffixes=("", '_right'))

produces

   a  b  b_right
0  1  6        6
1  2  6        6
2  3  6        6
3  4  6        6
4  5  6        6

Expected behavior
pandas does:

   a  b  b_right  b_right
0  1  6        6        6
1  2  6        6        6
2  3  6        6        6
3  4  6        6        6
4  5  6        6        6

If cuDF doesn't support duplicate column names, I'd expect it to raise

Environment overview (please complete the following information)

  • Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)]
  • Method of cuDF install: [conda, Docker, or from source]
    • If method of install is [Docker], provide docker pull & docker run commands used

cudf 24.12.00

Environment details
Please run and paste the output of the cudf/print_env.sh script here, to gather any other relevant environment details

Additional context
another Narwhals one

@MarcoGorelli MarcoGorelli added the bug Something isn't working label Feb 3, 2025
@mroeschke mroeschke added the Python Affects Python cuDF API. label Feb 3, 2025
@GPUtester GPUtester moved this from Todo to In Progress in cuDF Python Feb 3, 2025
@rapids-bot rapids-bot bot closed this as completed in df5c943 Feb 4, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in cuDF Python Feb 4, 2025
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
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants