Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inplace argument has no effect for rename_axis() #17317

Closed
Zhang18 opened this issue Aug 23, 2017 · 2 comments
Closed

inplace argument has no effect for rename_axis() #17317

Zhang18 opened this issue Aug 23, 2017 · 2 comments
Labels
Bug Duplicate Report Duplicate issue or pull request

Comments

@Zhang18
Copy link

Zhang18 commented Aug 23, 2017

Code Sample, a copy-pastable example if possible

	>>> df = pd.DataFrame([[1,2],[3,4]])
	>>> df
	   0  1
	0  1  2
	1  3  4
	>>> df.rename_axis('INDEX', inplace=True)
		0  1
	INDEX
	0      1  2
	1      3  4
	>>> df
	   0  1
	0  1  2
	1  3  4
	>>>

Problem description

The original dataframe is not changed even if the inplace argument is supplied.

Expected Output

        0  1
INDEX
0      1  2
1      3  4

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-92-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.20.2
pytest: None
pip: 9.0.1
setuptools: 20.7.0
Cython: None
numpy: 1.13.0
scipy: 0.19.1
xarray: None
IPython: 6.1.0
sphinx: None
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: 0.7.3
lxml: None
bs4: 4.4.1
html5lib: 0.9999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
s3fs: None
pandas_gbq: None
pandas_datareader: None

@gfyoung gfyoung added the Bug label Aug 23, 2017
@gfyoung
Copy link
Member

gfyoung commented Aug 23, 2017

Oops...also confirmed in 0.20.3. We're actually considering deprecating this parameter (xref #16529). That being said, I don't know if we want to do this immediately for this function.

Thus, we can either implement inplace=True OR we deprecate inplace immediately. @jreback ?

@TomAugspurger
Copy link
Contributor

Already fixed in #16505 :) (xref #15704)

@TomAugspurger TomAugspurger added this to the No action milestone Aug 23, 2017
@TomAugspurger TomAugspurger added the Duplicate Report Duplicate issue or pull request label Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Duplicate Report Duplicate issue or pull request
Projects
None yet
Development

No branches or pull requests

3 participants