-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: Some groupby internals #31915
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
CLN: Some groupby internals #31915
Conversation
Looks like a segfault on travis - restarted to see |
pandas/core/groupby/ops.py
Outdated
@@ -941,11 +939,13 @@ def _chop(self, sdata: DataFrame, slice_obj: slice) -> DataFrame: | |||
return sdata.iloc[:, slice_obj] | |||
|
|||
|
|||
def get_splitter(data: FrameOrSeries, *args, **kwargs) -> DataSplitter: | |||
def get_splitter( | |||
data: FrameOrSeries, labels, ngroups: int, axis: int = 0 |
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.
is labels an Index?
pandas/core/groupby/ops.py
Outdated
@@ -927,11 +927,9 @@ def _chop(self, sdata: Series, slice_obj: slice) -> Series: | |||
|
|||
|
|||
class FrameSplitter(DataSplitter): | |||
def fast_apply(self, f, names): | |||
def fast_apply(self, f, sdata, names): |
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.
is sdata a DataFrame?
potential annotations; LGTM pending green |
Can you merge master? Slightly concerned about reproducibility of previous segfault |
Thanks for the review. Merged master and all green |
* CLN: Some groupby internals * Additional annotation
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
_get_sorted_data()
twice*args, **kwargs
from an internal function