File tree 3 files changed +10
-1
lines changed
3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -475,6 +475,8 @@ Bug Fixes
475
475
caused possible color/class mismatch (:issue: `6956 `)
476
476
- Bug in ``radviz `` and ``andrews_curves `` where multiple values of 'color'
477
477
were being passed to plotting method (:issue: `6956 `)
478
+ - Bug in ``Float64Index.isin() `` where containing ``nan `` s would make indices
479
+ claim that they contained all the things (:issue: `7066 `).
478
480
479
481
pandas 0.13.1
480
482
-------------
Original file line number Diff line number Diff line change @@ -2096,7 +2096,8 @@ def isin(self, values):
2096
2096
"""
2097
2097
value_set = set (values )
2098
2098
return lib .ismember_nans (self ._array_values (), value_set ,
2099
- self ._hasnans )
2099
+ isnull (list (value_set )).any ())
2100
+
2100
2101
2101
2102
class MultiIndex (Index ):
2102
2103
Original file line number Diff line number Diff line change @@ -913,6 +913,12 @@ def test_contains_not_nans(self):
913
913
i = Float64Index ([1.0 , 2.0 , np .nan ])
914
914
self .assertTrue (1.0 in i )
915
915
916
+ def test_doesnt_contain_all_the_things (self ):
917
+ i = Float64Index ([np .nan ])
918
+ self .assertFalse (i .isin ([0 ]).item ())
919
+ self .assertFalse (i .isin ([1 ]).item ())
920
+ self .assertTrue (i .isin ([np .nan ]).item ())
921
+
916
922
917
923
class TestInt64Index (tm .TestCase ):
918
924
_multiprocess_can_split_ = True
You can’t perform that action at this time.
0 commit comments