#NEWLINE# def test_isin( self ) : #NEWLINE# #INDENT# sparse_df = DataFrame ( { #NEWLINE# #INDENT# 'flag' : [ 1.0 , 0.0 , 1.0 ] , #NEWLINE# #UNINDENT# } ) . to_sparse ( fill_value = 0.0 ) #NEWLINE# xp = rs [ ( sparse_df . flag == 1.0 ) ] #NEWLINE# rs = sparse_df [ sparse_df . flag . isin ( [ 1.0 ] ) ] #NEWLINE# tm . assert_frame_equal ( xp , rs )