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 74525b3
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -5004,6 +5004,43 @@ 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 74525b3

Please sign in to comment.