File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -475,6 +475,8 @@ Bug Fixes
475475 caused possible color/class mismatch (:issue: `6956 `)
476476- Bug in ``radviz `` and ``andrews_curves `` where multiple values of 'color'
477477 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 `).
478480
479481pandas 0.13.1
480482-------------
Original file line number Diff line number Diff line change @@ -2096,7 +2096,8 @@ def isin(self, values):
20962096 """
20972097 value_set = set (values )
20982098 return lib .ismember_nans (self ._array_values (), value_set ,
2099- self ._hasnans )
2099+ isnull (list (value_set )).any ())
2100+
21002101
21012102class MultiIndex (Index ):
21022103
Original file line number Diff line number Diff line change @@ -913,6 +913,12 @@ def test_contains_not_nans(self):
913913 i = Float64Index ([1.0 , 2.0 , np .nan ])
914914 self .assertTrue (1.0 in i )
915915
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+
916922
917923class TestInt64Index (tm .TestCase ):
918924 _multiprocess_can_split_ = True
You can’t perform that action at this time.
0 commit comments