#NEWLINE# def test_isin_with_i8( self ) : #NEWLINE# #INDENT# expected = Series ( [ True , True , False , False , False ] ) #NEWLINE# expected2 = Series ( [ False , True , False , False , False ] ) #NEWLINE# s = Series ( date_range ( 'jan-01-2013' , 'jan-05-2013' ) ) #NEWLINE# result = s . isin ( s [ 0 : 2 ] ) #NEWLINE# assert_series_equal ( result , expected ) #NEWLINE# result = s . isin ( expected [ 0 : 2 ] . values ) #NEWLINE# assert_series_equal ( result , expected ) #NEWLINE# result = s . isin ( s [ 0 : 2 ] . values . astype ( 'datetime64[D]' ) ) #NEWLINE# assert_series_equal ( result , expected ) #NEWLINE# result = s . isin ( [ s [ 1 ] ] ) #NEWLINE# assert_series_equal ( result , expected2 ) #NEWLINE# result = s . isin ( [ np . datetime64 ( s [ 1 ] ) ] ) #NEWLINE# assert_series_equal ( result , expected2 ) #NEWLINE# s = Series ( pd . to_timedelta ( lrange ( 5 ) , unit = 'd' ) ) #NEWLINE# result = s . isin ( s [ 0 : 2 ] ) #NEWLINE# assert_series_equal ( result , expected )