diff --git a/doc/source/whatsnew/v0.18.0.txt b/doc/source/whatsnew/v0.18.0.txt index a490a6f2a884b..ac4d21e78b4b3 100644 --- a/doc/source/whatsnew/v0.18.0.txt +++ b/doc/source/whatsnew/v0.18.0.txt @@ -112,19 +112,18 @@ Changes to rename ``Series.rename`` and ``NDFrame.rename_axis`` can now take a scalar or list-like argument for altering the Series or axis *name*, in addition to their old behaviors of altering labels. (:issue:`9494`, :issue:`11965`) -.. ipython: python +.. ipython:: python - s = pd.Series(np.random.randn(10)) + s = pd.Series(np.random.randn(5)) s.rename('newname') -.. ipython: python +.. ipython:: python - df = pd.DataFrame(np.random.randn(10, 2)) + df = pd.DataFrame(np.random.randn(5, 2)) (df.rename_axis("indexname") .rename_axis("columns_name", axis="columns")) -The new functionality works well in method chains. -Previously these methods only accepted functions or dicts mapping a *label* to a new label. +The new functionality works well in method chains. Previously these methods only accepted functions or dicts mapping a *label* to a new label. This continues to work as before for function or dict-like values.