Skip to content

Commit

Permalink
DOC: more fixes for v0.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed Feb 11, 2016
1 parent 42c4b76 commit 98b9f86
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions doc/source/whatsnew/v0.18.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down

0 comments on commit 98b9f86

Please sign in to comment.