#NEWLINE# def test_constructor_period( self ) : #NEWLINE# #INDENT# a = pd . PeriodIndex ( [ '2012-01' , 'NaT' , '2012-04' ] , freq = 'M' ) #NEWLINE# b = pd . PeriodIndex ( [ '2012-02-01' , '2012-03-01' , 'NaT' ] , freq = 'D' ) #NEWLINE# df = pd . DataFrame ( { #NEWLINE# #INDENT# 'a' : a , #NEWLINE# 'b' : b , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( df [ 'a' ] . dtype , 'object' ) #NEWLINE# self . assertEqual ( df [ 'b' ] . dtype , 'object' ) #NEWLINE# df = pd . DataFrame ( { #NEWLINE# #INDENT# 'a' : a . asobject . tolist ( ) , #NEWLINE# 'b' : b . asobject . tolist ( ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( df [ 'a' ] . dtype , 'object' ) #NEWLINE# self . assertEqual ( df [ 'b' ] . dtype , 'object' )