#NEWLINE# def test_to_records_with_Mapping_type( self ) : #NEWLINE# #INDENT# import email #NEWLINE# from email.parser import Parser #NEWLINE# import collections #NEWLINE# collections . Mapping . register ( email . message . Message ) #NEWLINE# headers = Parser ( ) . parsestr ( 'From: <user@example.com>\nTo: <someone_else@example.com>\nSubject: Test message\n\nBody would go here\n' ) #NEWLINE# frame = DataFrame . from_records ( [ headers ] ) #NEWLINE# all ( ( ( x in frame ) for x in [ 'Type' , 'Subject' , 'From' ] ) )