-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: GH12824 fixed apply() returns different result depending on whet… #12977
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
if isinstance(values[0], DataFrame): | ||
# GH12824. | ||
v = values[0] | ||
if v is None: |
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.
make this a helper function in core/groupby.py
(and consolidate the other one which has the same code)
can you rebase / update |
Rebased and made the changes you suggested but there was a new error with the test. It is introduced by #12743 which now throws an error in
|
@@ -3256,12 +3271,7 @@ def _wrap_applied_output(self, keys, values, not_indexed_same=False): | |||
|
|||
# make Nones an empty object | |||
if com._count_not_none(*values) != len(values): |
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 think we can remove the _count_not_none(....)
Current coverage is 84.12%@@ master #12977 diff @@
==========================================
Files 138 138
Lines 50388 50390 +2
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 42386 42388 +2
Misses 8002 8002
Partials 0 0
|
can you squash |
…her first result is None BUG: GH12824 fixed apply() returns different result depending on whether first result is None BUG: GH12824 rebased and made requested fixes BUG: GH12824 made requested change and added tests
thanks @adneu |
git diff upstream/master | flake8 --diff
In
_wrap_applied_output
forNDFrameGroupBy
, if the first result ofapply
isNone
, find the first non-None
result to determine behavior