File tree 1 file changed +5
-6
lines changed 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -112,19 +112,18 @@ Changes to rename
112
112
``Series.rename`` and ``NDFrame.rename_axis`` can now take a scalar or list-like
113
113
argument for altering the Series or axis *name*, in addition to their old behaviors of altering labels. (:issue:`9494`, :issue:`11965`)
114
114
115
- .. ipython: python
115
+ .. ipython:: python
116
116
117
- s = pd.Series(np.random.randn(10 ))
117
+ s = pd.Series(np.random.randn(5 ))
118
118
s.rename('newname')
119
119
120
- .. ipython: python
120
+ .. ipython:: python
121
121
122
- df = pd.DataFrame(np.random.randn(10 , 2))
122
+ df = pd.DataFrame(np.random.randn(5 , 2))
123
123
(df.rename_axis("indexname")
124
124
.rename_axis("columns_name", axis="columns"))
125
125
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.
128
127
This continues to work as before for function or dict-like values.
129
128
130
129
You can’t perform that action at this time.
0 commit comments