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

Ignore NaN correctly in .quantile #17593

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

mroeschke
Copy link
Contributor

Description

From an offline conversation, fixes the follow discrepancy between cudf and pandas

In [1]: import cudf

In [2]: import numpy as np

In [3]: ser = cudf.Series([np.nan, np.nan, 0.9], nan_as_null=False)

In [4]: ser
Out[4]: 
0    NaN
1    NaN
2    0.9
dtype: float64

In [5]: ser.quantile(0.9)
Out[5]: np.float64(nan)

In [6]: import pandas as pd

In [7]: ser = pd.Series([np.nan, np.nan, 0.9])

In [8]: ser.quantile(0.9)
Out[8]: np.float64(0.9)

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@mroeschke mroeschke added bug Something isn't working Python Affects Python cuDF API. non-breaking Non-breaking change labels Dec 13, 2024
@mroeschke mroeschke self-assigned this Dec 13, 2024
@mroeschke mroeschke requested a review from a team as a code owner December 13, 2024 21:04
@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 76b35ad into rapidsai:branch-25.02 Dec 13, 2024
108 checks passed
@mroeschke mroeschke deleted the bug/quantile/nan branch December 13, 2024 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants