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] Series.rank differs from pandas in pandas.cudf #17948

Closed
MarcoGorelli opened this issue Feb 7, 2025 · 0 comments · Fixed by #17954
Closed

[BUG] Series.rank differs from pandas in pandas.cudf #17948

MarcoGorelli opened this issue Feb 7, 2025 · 0 comments · Fixed by #17954
Labels
bug Something isn't working cudf.pandas Issues specific to cudf.pandas Python Affects Python cuDF API.

Comments

@MarcoGorelli
Copy link
Contributor

Steps/Code to reproduce bug

# t.py

import pandas as pd
data = {'a': [3, 6, 1, 1, None, 6], 'b': [1, 1, 2, 1, 2, 2]}
df = pd.DataFrame(data)
print(df['a'].rank())
$ python t.py
0    3.0
1    4.5
2    1.5
3    1.5
4    NaN
5    4.5
Name: a, dtype: float64
$ python -m cudf.pandas t.py
0    3.0
1    4.5
2    1.5
3    1.5
4    6.0
5    4.5
Name: a, dtype: float64

Expected behavior
matching output

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 and pandas versions: ('25.02.00a367', '2.2.3')

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 one from narwhals

@MarcoGorelli MarcoGorelli added the bug Something isn't working label Feb 7, 2025
@mroeschke mroeschke added the Python Affects Python cuDF API. label Feb 7, 2025
@GPUtester GPUtester moved this from Todo to In Progress in cuDF Python Feb 7, 2025
@mroeschke mroeschke added the cudf.pandas Issues specific to cudf.pandas label Feb 7, 2025
rapids-bot bot pushed a commit that referenced this issue Feb 8, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in cuDF Python Feb 8, 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 cudf.pandas Issues specific to cudf.pandas Python Affects Python cuDF API.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants