#NEWLINE# @ Appender ( ( generic . _shared_docs [ 'rename' ] % _shared_doc_kwargs ) ) #NEWLINE# def rename( self , index = None , **kwargs ) : #NEWLINE# #INDENT# non_mapping = ( lib . isscalar ( index ) or ( com . is_list_like ( index ) and ( not com . is_dict_like ( index ) ) ) ) #NEWLINE# if non_mapping : #NEWLINE# #INDENT# return self . _set_name ( index , inplace = kwargs . get ( 'inplace' ) ) #NEWLINE# #UNINDENT# return super ( Series , self ) . rename ( index = index , ** kwargs )