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 7b9c07b
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: ...,
*,
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,
Expand Down

0 comments on commit 7b9c07b

Please sign in to comment.