diff --git a/pandas/core/series.py b/pandas/core/series.py index 8ddce3d5cab26d..7f26b3d438a369 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -5004,6 +5004,42 @@ def reindex( # type: ignore[override] tolerance=tolerance, ) + @overload + def rename_axis( # type: ignore[override] + self, + mapper: ..., + *, + index = ..., + axis: Axis = ..., + copy: bool = ..., + inplace: bool = Literal[True], + ) -> None: + ... + + @overload + def rename_axis( # type: ignore[override] + self, + mapper: ..., + *, + index = ..., + axis: Axis = ..., + copy: bool = ..., + inplace: bool = Literal[False], + ) -> Self: + ... + + @overload + def rename_axis( # type: ignore[override] + self, + mapper: ..., + *, + index = ..., + axis: Axis = ..., + copy: bool = ..., + inplace: bool = ..., + ) -> Self | None: + ... + @doc(NDFrame.rename_axis) def rename_axis( # type: ignore[override] self,