#NEWLINE# def test_from_records_non_tuple( self ) : #NEWLINE# #INDENT# class Record ( object ) : #NEWLINE# #INDENT# def __init__( self , * args ) : #NEWLINE# #INDENT# self . args = args #NEWLINE# #UNINDENT# def __getitem__( self , i ) : #NEWLINE# #INDENT# return self . args [ i ] #NEWLINE# #UNINDENT# def __iter__( self ) : #NEWLINE# #INDENT# return iter ( self . args ) #NEWLINE# #UNINDENT# #UNINDENT# recs = [ Record ( 1 , 2 , 3 ) , Record ( 4 , 5 , 6 ) , Record ( 7 , 8 , 9 ) ] #NEWLINE# tups = lmap ( tuple , recs ) #NEWLINE# result = DataFrame . from_records ( recs ) #NEWLINE# expected = DataFrame . from_records ( tups ) #NEWLINE# assert_frame_equal ( result , expected )