-
Notifications
You must be signed in to change notification settings - Fork 915
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
[FEA][BACKLOG] Difference functionality #1271
Comments
@beckernick how is this different from a binary subtract operation ? |
Closing the loop on this issue, this functionality can be expressed as a call to shift followed by a binary subtract op with the operands being the original column and the shifted column. Column and Groupby shift have now been implemented in libcudf and the only remaining piece in Python is As a result, I believe this can be closed alongside #9604 when #9817 lands, and I'll update the PR description to reflect it. |
Fixes: #9604 and resolves #1271 Authors: - Sheilah Kirui (https://github.com/skirui-source) Approvers: - Karthikeyan (https://github.com/karthikeyann) - Bradley Dice (https://github.com/bdice) - Michael Wang (https://github.com/isVoid) URL: #9817
Is your feature request related to a problem? Please describe.
As a cuDF user, I want to calculate the difference between rows in a column (most commonly with the previous row). The equivalent in the pandas API docs is here for Series and here for Groupbys.
Describe the solution you'd like
I'd like to be able to call
.diff(n)
on:And return the appropriate object with the difference between each value and the value
n
rows "above" it.Describe alternatives you've considered
I could do this by going to the CPU or with a kernel by iterating through the column and populating a new device array of the same size.
The text was updated successfully, but these errors were encountered: