File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -112,19 +112,18 @@ Changes to rename
112112``Series.rename`` and ``NDFrame.rename_axis`` can now take a scalar or list-like
113113argument 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.
128127This continues to work as before for function or dict-like values.
129128
130129
You can’t perform that action at this time.
0 commit comments