-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
CLN: removes cython implementation of groupby count #11013
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
|
||
df = DataFrame({ | ||
'1st':np.random.choice(list(ascii_lowercase), n), | ||
'2nd':np.random.randint(0, 5, n), |
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.
add dtype='int64'
for the ints, otherwise these fail on windows (default for ndarray is int32 there)
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.
this should work with any integer type; these are not the values passed to cython method
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.
of course - but it will fail on windows because the expected is int32
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.
no, it should not
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.
try it - it does
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.
you try it, and if it crashed post the stack trace here
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.
pls make the changes that I commented then I will
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 stand corrected. You are not comparing versus the original, so ok here.
5018fcb
to
d968aab
Compare
@@ -3468,6 +3459,24 @@ def _apply_to_column_groupbys(self, func): | |||
in self._iterate_column_groupbys()), | |||
keys=self._selected_obj.columns, axis=1) | |||
|
|||
def count(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.
this needs to take the axis
kw to be back-compat. (I see that you changed a test to fix this, pls change back).
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.
Having an axis argument there is a bug when current master simply ignores the axis arg; groupby.py:L807
also, when doing a groupby, counting on axis=1
has no meaning because u may get a different values for each row regardless of keys being the same or different.
CLN: removes cython implementation of groupby count
ok thanks |
No description provided.