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.pandas incorrect results for rolling_sum with window=2 min_periods=1 #17786

Open
MarcoGorelli opened this issue Jan 23, 2025 · 0 comments · May be fixed by #17796
Open

[BUG] cudf.pandas incorrect results for rolling_sum with window=2 min_periods=1 #17786

MarcoGorelli opened this issue Jan 23, 2025 · 0 comments · May be fixed by #17796
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@MarcoGorelli
Copy link
Contributor

Describe the bug

# t.py
df = pd.DataFrame({"a": [None, 1, 2, None, 4, 6, 11]})
print(df)
print(df['a'].rolling(2, min_periods=1).sum())

Then run python -m cudf.pandas t.py

Expected behavior

0     NaN
1     1.0
2     3.0
3     2.0
4     4.0
5    10.0
6    17.0
Name: a, dtype: float64

Actual behaviour:

0     NaN
1     NaN
2     3.0
3     NaN
4     NaN
5    10.0
6    17.0
Name: a, dtype: float64

spotted in Narwhals

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

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

cudf '25.02.00a289'

Additional context
Add any other context about the problem here.

@MarcoGorelli MarcoGorelli added the bug Something isn't working label Jan 23, 2025
@mroeschke mroeschke added the Python Affects Python cuDF API. label Jan 23, 2025
@GPUtester GPUtester moved this from Todo to In Progress in cuDF Python Jan 23, 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: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants