Skip to content

Commit 926450b

Browse files
authored
Update series.pyi, tackling issue pandas-dev#1101
Imported Index from pandas and Changed keys method: def keys(self) -> Index: ...
1 parent 54b15c3 commit 926450b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas-stubs/core/series.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ from pandas import (
3434
PeriodDtype,
3535
Timedelta,
3636
Timestamp,
37+
Index,
3738
)
3839
from pandas.core.api import (
3940
Int8Dtype as Int8Dtype,
@@ -652,7 +653,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
652653
) -> _str: ...
653654
def to_xarray(self) -> xr.DataArray: ...
654655
def items(self) -> Iterable[tuple[Hashable, S1]]: ...
655-
def keys(self) -> list: ...
656+
def keys(self) -> Index: ...
656657
@overload
657658
def to_dict(self, *, into: type[dict] = ...) -> dict[Any, S1]: ...
658659
@overload

0 commit comments

Comments
 (0)