#NEWLINE# def to_string( self , buf = None , na_rep = 'NaN' , float_format = None , header = True , index = True , length = False , dtype = False , name = False , max_rows = None ) : #NEWLINE# #INDENT# "\n        Render a string representation of the Series\n\n        Parameters\n        ----------\n        buf : StringIO-like, optional\n            buffer to write to\n        na_rep : string, optional\n            string representation of NAN to use, default 'NaN'\n        float_format : one-parameter function, optional\n            formatter function to apply to columns' elements if they are floats\n            default None\n        header: boolean, default True\n            Add the Series header (index name)\n        index : bool, optional\n            Add index (row) labels, default True\n        length : boolean, default False\n            Add the Series length\n        dtype : boolean, default False\n            Add the Series dtype\n        name : boolean, default False\n            Add the Series name if not None\n        max_rows : int, optional\n            Maximum number of rows to show before truncating. If None, show\n            all.\n\n        Returns\n        -------\n        formatted : string (if not buffer passed)\n        " #NEWLINE# the_repr = self . _get_repr ( float_format = the_repr , na_rep = na_rep , header = header , index = index , length = length , dtype = dtype , name = name , max_rows = max_rows ) #NEWLINE# if ( not isinstance ( the_repr , compat . text_type ) ) : #NEWLINE# #INDENT# raise AssertionError ( 'result must be of type unicode, type of result is {0!r}' . format ( the_repr . __class__ . __name__ ) ) #NEWLINE# #UNINDENT# if ( buf is None ) : #NEWLINE# #INDENT# return the_repr #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# buf . write ( the_repr ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# with open ( buf , 'w' ) as f : #NEWLINE# #INDENT# f . write ( the_repr )