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

Correct dtype of count aggregations on empty dataframes #14473

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

wence-
Copy link
Contributor

@wence- wence- commented Nov 22, 2023

Description

A count aggregation should always return an int64 column, even if the grouped dataframe is empty. Previously we did not do this because the short-circuiting for empty inputs was hit before handling the count case. Fix this by reordering the conditions.

Checklist

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

A count aggregation should always return an int64 column, even if the
grouped dataframe is empty. Previously we did not do this because the
short-circuiting for empty inputs was hit before handling the count
case. Fix this by reordering the conditions.

- Closes rapidsai#14200
@wence- wence- requested a review from a team as a code owner November 22, 2023 16:34
@github-actions github-actions bot added the Python Affects Python cuDF API. label Nov 22, 2023
@wence- wence- added bug Something isn't working non-breaking Non-breaking change and removed Python Affects Python cuDF API. labels Nov 22, 2023
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

@wence-
Copy link
Contributor Author

wence- commented Nov 22, 2023

/merge

@rapids-bot rapids-bot bot merged commit f02fde9 into rapidsai:branch-24.02 Nov 22, 2023
67 checks passed
@wence- wence- deleted the wence/fix/14200 branch November 22, 2023 18:59
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
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] Unexpected errors for groupby agg on empty dask-cudf dataframe
3 participants