-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REGR: Groupby first/last/nth treats None as an observation #38330
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
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 find out when this was originally changed
this was on purpose
so you think that the original issues are wrong? this is deleting that test case and reverting |
if this is the case, should go in 1.1.5. |
I can restore the original test and add the new one for the regression if that's preferable. |
yes if this also doesn't change the original issue then leave the tests ok for 1.1.5 |
@jreback test restored, added to whatsnew 1.5 |
doc/source/whatsnew/v1.1.5.rst
Outdated
@@ -27,6 +27,7 @@ Fixed regressions | |||
- Fixed regression in :meth:`DataFrame.fillna` not filling ``NaN`` after other operations such as :meth:`DataFrame.pivot` (:issue:`36495`). | |||
- Fixed performance regression in ``df.groupby(..).rolling(..)`` (:issue:`38038`) | |||
- Fixed regression in :meth:`MultiIndex.intersection` returning duplicates when at least one of the indexes had duplicates (:issue:`36915`) | |||
- Fixed regression in :meth:`.GroupBy.first`, :meth:`.GroupBy.last`, and :meth:`.GroupBy.nth` where ``None`` was considered a non-NA value (:issue:`38286`) |
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 doesn't affect nth right?
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.
Indeed, thanks. Fixed.
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 u run some asvs / perf for this
i am worried we are converting to object type
@jreback asv run with Linux py39 failure is unrelated:
|
thanks for the quick patch @rhshadrach |
@meeseeksdev backport 1.1.x |
This comment has been minimized.
This comment has been minimized.
…e as an observation
…servation (#38333) Co-authored-by: Richard Shadrach <[email protected]>
We just upgraded to 1.1.5 this morning, and it works great! Thank you for the blazing fast discussion, decision, fix, merge, and backport! |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
This is a regression from 1.0.x to 1.1.x, introduced by #33462. Assuming it doesn't get into the 1.2 rc, not sure if it should go into 1.2 during the rc phase or wait until 1.3.
Had to decide on some edge-case behaviors in odd situations with missing values, see #38286 (comment)