Skip to content

Commit

Permalink
Add overload for rename_axis
Browse files Browse the repository at this point in the history
  • Loading branch information
caneff committed Oct 5, 2023
1 parent a5c7946 commit 697b4e8
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -5004,6 +5004,42 @@ def reindex( # type: ignore[override]
tolerance=tolerance,
)

@overload
def rename_axis( # type: ignore[override]
self,
mapper: IndexLabel | lib.NoDefault = ...,
*,
index = ...,
axis: Axis = ...,
copy: bool = ...,
inplace: bool = Literal[True],
) -> None:
...

@overload
def rename_axis( # type: ignore[override]
self,
mapper: IndexLabel | lib.NoDefault = ...,
*,
index = ...,
axis: Axis = ...,
copy: bool = ...,
inplace: bool = Literal[False],
) -> Self:
...

@overload
def rename_axis( # type: ignore[override]
self,
mapper: IndexLabel | lib.NoDefault = ...,
*,
index = ...,
axis: Axis = ...,
copy: bool = ...,
inplace: bool = ...,
) -> Self | None:
...

@doc(NDFrame.rename_axis)
def rename_axis( # type: ignore[override]
self,
Expand Down

0 comments on commit 697b4e8

Please sign in to comment.