-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF: de-duplicate _apply_to_group #29628
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
Conversation
@@ -189,6 +189,24 @@ cdef class _BaseGrouper: | |||
|
|||
return cached_typ, cached_ityp | |||
|
|||
cdef inline object _apply_to_group(self, |
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.
i would return a tuple(res, intitialized) here, less c-like i think is good generally (and this likely doesn't make it differetnt perf wise as this is object anyhow)
object cached_typ, object cached_ityp, | ||
Slider islider, Slider vslider, | ||
Py_ssize_t group_size, bint* initialized): | ||
cached_ityp._engine.clear_mapping() |
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.
can you add some sort of doc-string
functionally identical code in SeriesGrouper.get_result and SeriesBinGrouper.get_result, now shared.