Skip to content

Chainable Series.set_name() #9494

Closed
Closed
@wavexx

Description

@wavexx

It's sometimes convenient to assign/replace the name of a Series, especially if the result is going to be a DataFrame column, for example:

df.groupby([]).size().set_name('GRP_SIZE').reset_index()

This should be as simple as:

def set_name(self, name):
    self.name = name
    return self

Comments?

Metadata

Metadata

Assignees

No one assigned

    Labels

    API DesignCompatpandas objects compatability with Numpy or Python functions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions