-
- Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
API DesignIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves
Milestone
Description
It would be nice to have a method to change the .name attribute on the columns/index, to permit it in a method chain. (This is a suggestion based on this stackoverflow question.)
Instead of
df.columns.name = 'A' df.index.name = 'B' df A 0 1 B 0 9 4 1 15 0 2 17 16 it would allow something like
df.rename_columns('A').rename_index('B') or perhaps be a keyword argument to the existing .rename(). Does this seem like something that would fit in with pandas?
Metadata
Metadata
Assignees
Labels
API DesignIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves