Skip to content

Commit 697b4e8

Browse files
committed
Add overload for rename_axis
1 parent a5c7946 commit 697b4e8

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

pandas/core/series.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5004,6 +5004,42 @@ def reindex( # type: ignore[override]
50045004
tolerance=tolerance,
50055005
)
50065006

5007+
@overload
5008+
def rename_axis( # type: ignore[override]
5009+
self,
5010+
mapper: IndexLabel | lib.NoDefault = ...,
5011+
*,
5012+
index = ...,
5013+
axis: Axis = ...,
5014+
copy: bool = ...,
5015+
inplace: bool = Literal[True],
5016+
) -> None:
5017+
...
5018+
5019+
@overload
5020+
def rename_axis( # type: ignore[override]
5021+
self,
5022+
mapper: IndexLabel | lib.NoDefault = ...,
5023+
*,
5024+
index = ...,
5025+
axis: Axis = ...,
5026+
copy: bool = ...,
5027+
inplace: bool = Literal[False],
5028+
) -> Self:
5029+
...
5030+
5031+
@overload
5032+
def rename_axis( # type: ignore[override]
5033+
self,
5034+
mapper: IndexLabel | lib.NoDefault = ...,
5035+
*,
5036+
index = ...,
5037+
axis: Axis = ...,
5038+
copy: bool = ...,
5039+
inplace: bool = ...,
5040+
) -> Self | None:
5041+
...
5042+
50075043
@doc(NDFrame.rename_axis)
50085044
def rename_axis( # type: ignore[override]
50095045
self,

0 commit comments

Comments
 (0)