#NEWLINE# def test_crosstab_dropna( self ) : #NEWLINE# #INDENT# a = np . array ( [ 'foo' , 'foo' , 'foo' , 'bar' , 'bar' , 'foo' , 'foo' ] , dtype = object ) #NEWLINE# b = np . array ( [ 'one' , 'one' , 'two' , 'one' , 'two' , 'two' , 'two' ] , dtype = object ) #NEWLINE# c = np . array ( [ 'dull' , 'dull' , 'dull' , 'dull' , 'dull' , 'shiny' , 'shiny' ] , dtype = object ) #NEWLINE# res = pd . crosstab ( a , [ b , c ] , rownames = [ 'a' ] , colnames = [ 'b' , 'c' ] , dropna = False ) #NEWLINE# m = MultiIndex . from_tuples ( [ ( 'one' , 'dull' ) , ( 'one' , 'shiny' ) , ( 'two' , 'dull' ) , ( 'two' , 'shiny' ) ] ) #NEWLINE# assert_equal ( res . columns . values , m . values )