A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/11965 below:

Add method to change the .name attribute on the axes · Issue #11965 · pandas-dev/pandas · GitHub

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?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4