#NEWLINE# def serialize_dataframe( writer , data_type_id , dataframe ) : #NEWLINE# #INDENT# '\n    Serialize a dataframe.\n\n    Parameters\n    ----------\n    writer : file\n        File-like object to write to. Must be opened in binary mode.\n    data_type_id : dict\n        Serialization format to use.\n        See the azureml.DataTypeIds class for constants.\n    dataframe: pandas.DataFrame\n        Dataframe to serialize.\n    ' #NEWLINE# _not_none ( 'writer' , writer ) #NEWLINE# _not_none_or_empty ( 'data_type_id' , data_type_id ) #NEWLINE# _not_none ( 'dataframe' , dataframe ) #NEWLINE# serializer = _SERIALIZERS . get ( data_type_id ) #NEWLINE# if ( serializer is None ) : #NEWLINE# #INDENT# raise UnsupportedDatasetTypeError ( data_type_id ) #NEWLINE# #UNINDENT# serializer [ 0 ] ( writer = writer , dataframe = data_type_id )