#NEWLINE# def to_frame( self , name = None ) : #NEWLINE# #INDENT# '\n        Convert Series to DataFrame\n\n        Parameters\n        ----------\n        name : object, default None\n            The passed name should substitute for the series name (if it has\n            one).\n\n        Returns\n        -------\n        data_frame : DataFrame\n        ' #NEWLINE# if ( name is None ) : #NEWLINE# #INDENT# df = self . _constructor_expanddim ( self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# df = self . _constructor_expanddim ( { #NEWLINE# #INDENT# name : self , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# return df