-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
BUG:Clip with a list-like threshold with a nan is broken (GH19992) #21921
Conversation
makbigc
commented
Jul 15, 2018
•
edited by jreback
Loading
edited by jreback
- fix bug BUG: clip with a list-like threshold with a nan is broken #19992
- 2 tests amended in frame/test_analytics.py and series/test_analytics.py
- whatsnew entry added
Codecov Report
@@ Coverage Diff @@
## master #21921 +/- ##
=======================================
Coverage 91.96% 91.96%
=======================================
Files 166 166
Lines 50329 50329
=======================================
Hits 46287 46287
Misses 4042 4042
Continue to review full report at Codecov.
|
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.
small comments. lgtm otherwise. ping on green.
doc/source/whatsnew/v0.24.0.txt
Outdated
@@ -440,6 +440,7 @@ Missing | |||
|
|||
- Bug in :func:`DataFrame.fillna` where a ``ValueError`` would raise when one column contained a ``datetime64[ns, tz]`` dtype (:issue:`15522`) | |||
- Bug in :func:`Series.hasnans` that could be incorrectly cached and return incorrect answers if null elements are introduced after an initial call (:issue:`19700`) | |||
- Bug in :func:`Series.clip` and `DataFrame.clip` cannot accept list-like threshold containing nan (:issue:`19992`) |
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 the ref for DataFrame, use double back-ticks on NaN
(and sp)
tm.assert_frame_equal(self.frame.clip(upper=np.nan, lower=np.nan), | ||
self.frame) | ||
|
||
# GH #19992 |
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 comment under the commit number what this is testing
use
result =
expected =
tm.assert_frame_equal(....)
do the tests in order for axis=0, axis=0, IOW so you don't have the df1, df2 variables
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.
Amended. Your format is better. Thanks.
does this also close #19976 ? |
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.
does this close #19976, pls move to 0.23.4 whatnew
doc/source/whatsnew/v0.24.0.txt
Outdated
@@ -440,6 +440,7 @@ Missing | |||
|
|||
- Bug in :func:`DataFrame.fillna` where a ``ValueError`` would raise when one column contained a ``datetime64[ns, tz]`` dtype (:issue:`15522`) | |||
- Bug in :func:`Series.hasnans` that could be incorrectly cached and return incorrect answers if null elements are introduced after an initial call (:issue:`19700`) | |||
- Bug in :func:`Series.clip` and :func:`DataFrame.clip` cannot accept list-like threshold containing ``NaN`` (:issue:`19992`) |
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.
go ahead and move to 0.23.4
thanks @makbigc |