-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make groupby transform-like op order match original data order (#8720)
Closes #8714 This PR makes transform-like ops return results with orders matching that of inputs. For example: `groupby.shift` ```python In [21]: df.head(8) Out[21]: key val1 0 1 70 1 1 86 2 0 18 3 1 91 4 1 74 5 1 97 6 0 43 7 0 48 In [22]: df.groupby('key').shift(1).head(8) Out[22]: val1 0 <NA> 1 70 2 <NA> 3 86 4 91 5 74 6 18 7 43 ``` This would affect `groupby.scan` and `groupby.shift`. Authors: - Michael Wang (https://github.com/isVoid) Approvers: - Charles Blackmon-Luca (https://github.com/charlesbluca) - Ashwin Srinath (https://github.com/shwina) URL: #8720
- Loading branch information
Showing
2 changed files
with
10 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters