-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Cythonized GroupBy Fill #19673
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
Merged
Merged
Cythonized GroupBy Fill #19673
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c58123c
Added test case for groupby fill methods
WillAyd 2bc8023
Added code for group_fillna
WillAyd 3cb25c0
Added ASV benchmarks
WillAyd 7fecc11
Connected GroupBy method to Cython fillna
WillAyd 3c2fb36
Fixed issue when filling Series after GroupBy
WillAyd a52b8c4
Added tests to mix group entries; fixed sort bug
WillAyd 16c1823
Simplied groupby Cython calls for ffill/bfill
WillAyd bd3d5e0
Removed abandoned Cython implementation
WillAyd cae65af
Added upcast to int64 to prevent 32 bit failures
WillAyd 0266514
Fixed issue with reconstructing grouped Series
WillAyd 50dc690
Changed .view to .astype to avoid 32 bit segfaults
WillAyd 9fa8e25
Added whatsnew
WillAyd 5da06d8
Aligned group_fillna and group_shift signatures
WillAyd 2fe91a4
Fixed failing test; list comp for _fill method
WillAyd 825ba17
Updated whatsnew
WillAyd 127c71c
PEP8 fixes
WillAyd 3a23cd6
Py27 support with super call
WillAyd a363146
Fixed LINT issue
WillAyd fd513c8
Used kwargs to call Cython groupby funcs
WillAyd 776d1b7
Docstring for _fill method
WillAyd 33f0d06
Cleaned up kwargs passing to Cython layer
WillAyd 662008a
Idiomatic update - replace join with concat
WillAyd 27e24fa
Moved non-templated funcs to groupby.pyx
WillAyd 6f72476
Code update - swap group_index.take with grouper
WillAyd eff6603
Rebase and update import
WillAyd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Py27 support with super call
- Loading branch information
commit 3a23cd6afa3cba4980b5a5c9e4a7028949b12e93
There are no files selected for viewing
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe missing something obvious, but isn't the
take
unnecessary - couldn't you use the original grouping columns?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly could be a better way to do it - first time working this far into the API so if there's any easier way you know of that I missed let me know.
FWIW I think that instead of the
take
we could replace this withgrp.grouper
and get the same values - is that what you are referring to?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay - was working from my memory and I honestly get lost on all the levels of groupby, groupers, and groupings. What you want here is
grp.grouper
- it has the original values without the need to take again.