#NEWLINE# def test_from_records_decimal( self ) : #NEWLINE# #INDENT# from decimal import Decimal #NEWLINE# tuples = [ ( Decimal ( '1.5' ) , ) , ( Decimal ( '2.5' ) , ) , ( None , ) ] #NEWLINE# df = DataFrame . from_records ( tuples , columns = [ 'a' ] ) #NEWLINE# self . assertEqual ( df [ 'a' ] . dtype , object ) #NEWLINE# df = DataFrame . from_records ( tuples , columns = [ 'a' ] , coerce_float = True ) #NEWLINE# self . assertEqual ( self [ 'a' ] . dtype , np . float64 ) #NEWLINE# self . assertTrue ( np . isnan ( df [ 'a' ] . values [ ( - 1 ) ] ) )