8000 DOC: Improve "inplace" param in Dataframe.rename() docs by nmusolino · Pull Request #24037 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DOC: Improve "inplace" param in Dataframe.rename() docs #24037

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

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
TST: Assert result of in-place rename is None
  • Loading branch information
nmusolino committed Dec 1, 2018
commit f273ef05303797c8992c4402bf1d5e6e18f23daf
3 changes: 2 additions & 1 deletion pandas/tests/frame/test_alter_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,9 @@ def test_rename_inplace(self, float_frame):

c_id = id(float_frame['C'])
float_frame = float_frame.copy()
float_frame.rename(columns={'C': 'foo'}, inplace=True)
result = float_frame.rename(columns={'C': 'foo'}, inplace=True)

assert result is None
assert 'C' not in float_frame
assert 'foo' in float_frame
assert id(float_frame['foo']) != c_id
Expand Down
0