diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 85b6a8431617a..c1c659ffdc17f 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -1012,6 +1012,9 @@ def rename_axis(self, mapper=lib.no_default, **kwargs): index, columns : scalar, list-like, dict-like or function, optional A scalar, list-like, dict-like or functions transformations to apply to that axis' values. + Note that the ``columns`` parameter is not allowed if the + object is a Series. This parameter only apply for DataFrame + type objects. Use either ``mapper`` and ``axis`` to specify the axis to target with ``mapper``, or ``index``