From 03786f16e1f1cee0e9f598394f8bc46dfcb9685d Mon Sep 17 00:00:00 2001 From: Subhendu Ranjan Mishra Date: Fri, 12 Oct 2018 17:44:24 +0530 Subject: [PATCH 1/2] Fixes issue #23076 - Unclear documentation of inplace parameter for rename function --- pandas/core/frame.py | 4 ++-- pandas/core/generic.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index e9be7a3e9afb8..1143ee9ee113c 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -3828,8 +3828,8 @@ def rename(self, *args, **kwargs): copy : boolean, default True Also copy underlying data inplace : boolean, default False - Whether to return a new DataFrame. If True then value of copy is - ignored. + Modify the DataFrame in place (do not create a new object). + If True then value of copy is ignored. level : int or level name, default None In case of a MultiIndex, only rename labels in the specified level. diff --git a/pandas/core/generic.py b/pandas/core/generic.py index bb82c531b698e..2419ae4267724 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -980,8 +980,8 @@ def rename(self, *args, **kwargs): copy : boolean, default True Also copy underlying data inplace : boolean, default False - Whether to return a new %(klass)s. If True then value of copy is - ignored. + Modify the %(klass)s inplace (do not create a new object). + If True then value of copy is ignored. level : int or level name, default None In case of a MultiIndex, only rename labels in the specified level. From 049661dc12369e142bda1165d9a85d93afb7edfd Mon Sep 17 00:00:00 2001 From: Subhendu Ranjan Mishra Date: Fri, 12 Oct 2018 18:05:37 +0530 Subject: [PATCH 2/2] Fix pep8 W291 : Trailing space --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 1143ee9ee113c..8f7b6ecdc3b13 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -3828,7 +3828,7 @@ def rename(self, *args, **kwargs): copy : boolean, default True Also copy underlying data inplace : boolean, default False - Modify the DataFrame in place (do not create a new object). + Modify the DataFrame in place (do not create a new object). If True then value of copy is ignored. level : int or level name, default None In case of a MultiIndex, only rename labels in the specified