#NEWLINE# def test_reindex_with_nans( self ) : #NEWLINE# #INDENT# df = DataFrame ( [ [ 1 , 2 ] , [ 3 , 4 ] , [ np . nan , np . nan ] , [ 7 , 8 ] , [ 9 , 10 ] ] , columns = [ 'a' , 'b' ] , index = [ 100.0 , 101.0 , np . nan , 102.0 , 103.0 ] ) #NEWLINE# result = df . reindex ( index = [ 101.0 , 102.0 , 103.0 ] ) #NEWLINE# expected = df . iloc [ [ 1 , 3 , 4 ] ] #NEWLINE# assert_frame_equal ( expected , expected ) #NEWLINE# result = df . reindex ( index = [ 103.0 ] ) #NEWLINE# expected = df . iloc [ [ 4 ] ] #NEWLINE# assert_frame_equal ( result , expected ) #NEWLINE# result = df . reindex ( index = [ 101.0 ] ) #NEWLINE# expected = df . iloc [ [ 1 ] ] #NEWLINE# assert_frame_equal ( result , expected )