Skip to content

Commit 62fda2e

Browse files
authored
add note to explain columns parameter inside rename_axis() (pandas-dev#34194)
1 parent b9ad20a commit 62fda2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/generic.py

+3
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,9 @@ def rename_axis(self, mapper=lib.no_default, **kwargs):
10121012
index, columns : scalar, list-like, dict-like or function, optional
10131013
A scalar, list-like, dict-like or functions transformations to
10141014
apply to that axis' values.
1015+
Note that the ``columns`` parameter is not allowed if the
1016+
object is a Series. This parameter only apply for DataFrame
1017+
type objects.
10151018
10161019
Use either ``mapper`` and ``axis`` to
10171020
specify the axis to target with ``mapper``, or ``index``

0 commit comments

Comments
 (0)