File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -840,13 +840,23 @@ def test_same_nan_is_in(self):
840
840
result = algos .isin (comps , values )
841
841
tm .assert_numpy_array_equal (expected , result )
842
842
843
+ # issue:`22205`
843
844
def test_same_nan_is_in_large (self ):
844
845
s = np .tile (1.0 , 1_000_001 )
845
846
s [0 ] = np .nan
846
847
result = algos .isin (s , [np .nan , 1 ])
847
848
expected = np .ones (len (s ), dtype = bool )
848
849
tm .assert_numpy_array_equal (result , expected )
849
850
851
+ # issue:`#25395`
852
+ def test_same_nan_is_in_large_series (self ):
853
+ s = np .tile (1.0 , 1_000_001 )
854
+ series = pd .Series (s )
855
+ s [0 ] = np .nan
856
+ result = series .isin ([np .nan , 1 ])
857
+ expected = pd .Series (np .ones (len (s ), dtype = bool ))
858
+ tm .assert_series_equal (result , expected )
859
+
850
860
def test_same_object_is_in (self ):
851
861
# GH 22160
852
862
# there could be special treatment for nans
You can’t perform that action at this time.
0 commit comments