Skip to content

Commit 98b9f86

Browse files
committed
DOC: more fixes for v0.18.0
1 parent 42c4b76 commit 98b9f86

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

doc/source/whatsnew/v0.18.0.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,18 @@ Changes to rename
112112
``Series.rename`` and ``NDFrame.rename_axis`` can now take a scalar or list-like
113113
argument for altering the Series or axis *name*, in addition to their old behaviors of altering labels. (:issue:`9494`, :issue:`11965`)
114114

115-
.. ipython: python
115+
.. ipython:: python
116116

117-
s = pd.Series(np.random.randn(10))
117+
s = pd.Series(np.random.randn(5))
118118
s.rename('newname')
119119

120-
.. ipython: python
120+
.. ipython:: python
121121

122-
df = pd.DataFrame(np.random.randn(10, 2))
122+
df = pd.DataFrame(np.random.randn(5, 2))
123123
(df.rename_axis("indexname")
124124
.rename_axis("columns_name", axis="columns"))
125125

126-
The new functionality works well in method chains.
127-
Previously these methods only accepted functions or dicts mapping a *label* to a new label.
126+
The new functionality works well in method chains. Previously these methods only accepted functions or dicts mapping a *label* to a new label.
128127
This continues to work as before for function or dict-like values.
129128

130129

0 commit comments

Comments
 (0)