@@ -264,7 +264,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
264
264
dtype : Dtype = ...,
265
265
name : Hashable = ...,
266
266
copy : bool = ...,
267
- ) -> UnknownSeries : ...
267
+ ) -> Series : ...
268
268
@overload
269
269
def __new__ (
270
270
cls ,
@@ -418,7 +418,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
418
418
dtype : Dtype = ...,
419
419
name : Hashable = ...,
420
420
copy : bool = ...,
421
- ) -> UnknownSeries : ...
421
+ ) -> Series : ...
422
422
@property
423
423
def hasnans (self ) -> bool : ...
424
424
def div (
@@ -731,7 +731,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
731
731
@overload
732
732
def groupby (
733
733
self ,
734
- by : CategoricalIndex | Index | UnknownSeries ,
734
+ by : CategoricalIndex | Index | Series ,
735
735
axis : AxisIndex = ...,
736
736
level : IndexLabel | None = ...,
737
737
as_index : _bool = ...,
@@ -814,15 +814,15 @@ class Series(IndexOpsMixin[S1], NDFrame):
814
814
self , other : ArrayLike | dict [_str , np .ndarray ] | Sequence [S1 ] | Index [S1 ]
815
815
) -> np .ndarray : ...
816
816
@overload
817
- def __matmul__ (self , other : UnknownSeries ) -> Scalar : ...
817
+ def __matmul__ (self , other : Series ) -> Scalar : ...
818
818
@overload
819
- def __matmul__ (self , other : DataFrame ) -> UnknownSeries : ...
819
+ def __matmul__ (self , other : DataFrame ) -> Series : ...
820
820
@overload
821
821
def __matmul__ (self , other : np .ndarray ) -> np .ndarray : ...
822
822
@overload
823
- def __rmatmul__ (self , other : UnknownSeries ) -> Scalar : ...
823
+ def __rmatmul__ (self , other : Series ) -> Scalar : ...
824
824
@overload
825
- def __rmatmul__ (self , other : DataFrame ) -> UnknownSeries : ...
825
+ def __rmatmul__ (self , other : DataFrame ) -> Series : ...
826
826
@overload
827
827
def __rmatmul__ (self , other : np .ndarray ) -> np .ndarray : ...
828
828
@overload
@@ -842,16 +842,16 @@ class Series(IndexOpsMixin[S1], NDFrame):
842
842
@overload
843
843
def compare (
844
844
self ,
845
- other : UnknownSeries ,
845
+ other : Series ,
846
846
align_axis : AxisIndex ,
847
847
keep_shape : bool = ...,
848
848
keep_equal : bool = ...,
849
849
result_names : Suffixes = ...,
850
- ) -> UnknownSeries : ...
850
+ ) -> Series : ...
851
851
@overload
852
852
def compare (
853
853
self ,
854
- other : UnknownSeries ,
854
+ other : Series ,
855
855
align_axis : AxisColumn = ...,
856
856
keep_shape : bool = ...,
857
857
keep_equal : bool = ...,
@@ -951,9 +951,9 @@ class Series(IndexOpsMixin[S1], NDFrame):
951
951
@overload
952
952
def map (
953
953
self ,
954
- arg : Callable [[Any ], Any ] | Mapping [Any , Any ] | UnknownSeries ,
954
+ arg : Callable [[Any ], Any ] | Mapping [Any , Any ] | Series ,
955
955
na_action : Literal ["ignore" ] | None = ...,
956
- ) -> UnknownSeries : ...
956
+ ) -> Series : ...
957
957
@overload
958
958
def aggregate (
959
959
self : Series [int ],
@@ -977,7 +977,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
977
977
axis : AxisIndex = ...,
978
978
* args : Any ,
979
979
** kwargs : Any ,
980
- ) -> UnknownSeries : ...
980
+ ) -> Series : ...
981
981
agg = aggregate
982
982
@overload
983
983
def transform (
@@ -1004,7 +1004,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
1004
1004
convertDType : _bool = ...,
1005
1005
args : tuple = ...,
1006
1006
** kwargs : Any ,
1007
- ) -> UnknownSeries : ...
1007
+ ) -> Series : ...
1008
1008
@overload
1009
1009
def apply (
1010
1010
self ,
@@ -1016,20 +1016,20 @@ class Series(IndexOpsMixin[S1], NDFrame):
1016
1016
@overload
1017
1017
def apply (
1018
1018
self ,
1019
- func : Callable [..., UnknownSeries ],
1019
+ func : Callable [..., Series ],
1020
1020
convertDType : _bool = ...,
1021
1021
args : tuple = ...,
1022
1022
** kwargs : Any ,
1023
1023
) -> DataFrame : ...
1024
1024
def align (
1025
1025
self ,
1026
- other : DataFrame | UnknownSeries ,
1026
+ other : DataFrame | Series ,
1027
1027
join : JoinHow = ...,
1028
1028
axis : Axis | None = ...,
1029
1029
level : Level | None = ...,
1030
1030
copy : _bool = ...,
1031
1031
fill_value : Scalar | NAType | None = ...,
1032
- ) -> tuple [UnknownSeries , UnknownSeries ]: ...
1032
+ ) -> tuple [Series , Series ]: ...
1033
1033
@overload
1034
1034
def rename (
1035
1035
self ,
@@ -1124,7 +1124,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
1124
1124
freq : DateOffset | timedelta | _str | None = ...,
1125
1125
axis : Axis = ...,
1126
1126
fill_value : Scalar | NAType | None = ...,
1127
- ) -> UnknownSeries : ...
1127
+ ) -> Series : ...
1128
1128
def info (
1129
1129
self ,
1130
1130
verbose : bool | None = ...,
@@ -1507,15 +1507,11 @@ class Series(IndexOpsMixin[S1], NDFrame):
1507
1507
tuple [
1508
1508
Sequence [bool ]
1509
1509
| Series [bool ]
1510
- | Callable [
1511
- [UnknownSeries ], UnknownSeries | np .ndarray | Sequence [bool ]
1512
- ],
1513
- ListLikeU
1514
- | Scalar
1515
- | Callable [[UnknownSeries ], UnknownSeries | np .ndarray ],
1510
+ | Callable [[Series ], Series | np .ndarray | Sequence [bool ]],
1511
+ ListLikeU | Scalar | Callable [[Series ], Series | np .ndarray ],
1516
1512
],
1517
1513
],
1518
- ) -> UnknownSeries : ...
1514
+ ) -> Series : ...
1519
1515
def truncate (
1520
1516
self ,
1521
1517
before : date | _str | int | None = ...,
@@ -1586,16 +1582,8 @@ class Series(IndexOpsMixin[S1], NDFrame):
1586
1582
@overload
1587
1583
def __add__ (
1588
1584
self ,
1589
- other : (
1590
- num
1591
- | _str
1592
- | timedelta
1593
- | Timedelta
1594
- | _ListLike
1595
- | UnknownSeries
1596
- | np .timedelta64
1597
- ),
1598
- ) -> UnknownSeries : ...
1585
+ other : num | _str | timedelta | Timedelta | _ListLike | Series | np .timedelta64 ,
1586
+ ) -> Series : ...
1599
1587
# ignore needed for mypy as we want different results based on the arguments
1600
1588
@overload # type: ignore[override]
1601
1589
def __and__ ( # pyright: ignore[reportOverlappingOverload]
@@ -1624,7 +1612,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
1624
1612
self , other : timedelta | Timedelta | TimedeltaSeries | np .timedelta64
1625
1613
) -> TimedeltaSeries : ...
1626
1614
@overload
1627
- def __mul__ (self , other : num | _ListLike | UnknownSeries ) -> UnknownSeries : ...
1615
+ def __mul__ (self , other : num | _ListLike | Series ) -> Series : ...
1628
1616
def __mod__ (self , other : num | _ListLike | Series [S1 ]) -> Series [S1 ]: ...
1629
1617
def __ne__ (self , other : object ) -> Series [_bool ]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
1630
1618
def __pow__ (self , other : num | _ListLike | Series [S1 ]) -> Series [S1 ]: ...
@@ -1638,9 +1626,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
1638
1626
@overload
1639
1627
def __radd__ (self , other : S1 | Series [S1 ]) -> Self : ...
1640
1628
@overload
1641
- def __radd__ (
1642
- self , other : num | _str | _ListLike | UnknownSeries
1643
- ) -> UnknownSeries : ...
1629
+ def __radd__ (self , other : num | _str | _ListLike | Series ) -> Series : ...
1644
1630
# ignore needed for mypy as we want different results based on the arguments
1645
1631
@overload # type: ignore[override]
1646
1632
def __rand__ ( # pyright: ignore[reportOverlappingOverload]
@@ -1657,7 +1643,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
1657
1643
self , other : timedelta | Timedelta | TimedeltaSeries | np .timedelta64
1658
1644
) -> TimedeltaSeries : ...
1659
1645
@overload
1660
- def __rmul__ (self , other : num | _ListLike | UnknownSeries ) -> UnknownSeries : ...
1646
+ def __rmul__ (self , other : num | _ListLike | Series ) -> Series : ...
1661
1647
def __rnatmul__ (self , other : num | _ListLike | Series [S1 ]) -> Series [S1 ]: ...
1662
1648
def __rpow__ (self , other : num | _ListLike | Series [S1 ]) -> Series [S1 ]: ...
1663
1649
# ignore needed for mypy as we want different results based on the arguments
@@ -1667,10 +1653,8 @@ class Series(IndexOpsMixin[S1], NDFrame):
1667
1653
) -> Series [bool ]: ...
1668
1654
@overload
1669
1655
def __ror__ (self , other : int | np_ndarray_anyint | Series [int ]) -> Series [int ]: ...
1670
- def __rsub__ (self , other : num | _ListLike | Series [S1 ]) -> UnknownSeries : ...
1671
- def __rtruediv__ (
1672
- self , other : num | _ListLike | Series [S1 ] | Path
1673
- ) -> UnknownSeries : ...
1656
+ def __rsub__ (self , other : num | _ListLike | Series [S1 ]) -> Series : ...
1657
+ def __rtruediv__ (self , other : num | _ListLike | Series [S1 ] | Path ) -> Series : ...
1674
1658
# ignore needed for mypy as we want different results based on the arguments
1675
1659
@overload # type: ignore[override]
1676
1660
def __rxor__ ( # pyright: ignore[reportOverlappingOverload]
@@ -1693,10 +1677,8 @@ class Series(IndexOpsMixin[S1], NDFrame):
1693
1677
self , other : Timestamp | datetime | TimestampSeries
1694
1678
) -> TimedeltaSeries : ...
1695
1679
@overload
1696
- def __sub__ (self , other : num | _ListLike | UnknownSeries ) -> UnknownSeries : ...
1697
- def __truediv__ (
1698
- self , other : num | _ListLike | Series [S1 ] | Path
1699
- ) -> UnknownSeries : ...
1680
+ def __sub__ (self , other : num | _ListLike | Series ) -> Series : ...
1681
+ def __truediv__ (self , other : num | _ListLike | Series [S1 ] | Path ) -> Series : ...
1700
1682
# ignore needed for mypy as we want different results based on the arguments
1701
1683
@overload # type: ignore[override]
1702
1684
def __xor__ ( # pyright: ignore[reportOverlappingOverload]
@@ -1799,12 +1781,12 @@ class Series(IndexOpsMixin[S1], NDFrame):
1799
1781
min_periods : int = ...,
1800
1782
adjust : _bool = ...,
1801
1783
ignore_na : _bool = ...,
1802
- ) -> ExponentialMovingWindow [UnknownSeries ]: ...
1784
+ ) -> ExponentialMovingWindow [Series ]: ...
1803
1785
def expanding (
1804
1786
self ,
1805
1787
min_periods : int = ...,
1806
1788
method : CalculationMethod = ...,
1807
- ) -> Expanding [UnknownSeries ]: ...
1789
+ ) -> Expanding [Series ]: ...
1808
1790
def floordiv (
1809
1791
self ,
1810
1792
other : num | _ListLike | Series [S1 ],
@@ -1907,11 +1889,11 @@ class Series(IndexOpsMixin[S1], NDFrame):
1907
1889
@overload
1908
1890
def mul (
1909
1891
self ,
1910
- other : num | _ListLike | UnknownSeries ,
1892
+ other : num | _ListLike | Series ,
1911
1893
level : Level | None = ...,
1912
1894
fill_value : float | None = ...,
1913
1895
axis : AxisIndex | None = ...,
1914
- ) -> UnknownSeries : ...
1896
+ ) -> Series : ...
1915
1897
def multiply (
1916
1898
self ,
1917
1899
other : num | _ListLike | Series [S1 ],
@@ -1991,11 +1973,11 @@ class Series(IndexOpsMixin[S1], NDFrame):
1991
1973
@overload
1992
1974
def rmul (
1993
1975
self ,
1994
- other : num | _ListLike | UnknownSeries ,
1976
+ other : num | _ListLike | Series ,
1995
1977
level : Level | None = ...,
1996
1978
fill_value : float | None = ...,
1997
1979
axis : AxisIndex = ...,
1998
- ) -> UnknownSeries : ...
1980
+ ) -> Series : ...
1999
1981
@overload
2000
1982
def rolling (
2001
1983
self ,
@@ -2008,7 +1990,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
2008
1990
method : CalculationMethod = ...,
2009
1991
* ,
2010
1992
win_type : _str ,
2011
- ) -> Window [UnknownSeries ]: ...
1993
+ ) -> Window [Series ]: ...
2012
1994
@overload
2013
1995
def rolling (
2014
1996
self ,
@@ -2021,7 +2003,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
2021
2003
method : CalculationMethod = ...,
2022
2004
* ,
2023
2005
win_type : None = ...,
2024
- ) -> Rolling [UnknownSeries ]: ...
2006
+ ) -> Rolling [Series ]: ...
2025
2007
def rpow (
2026
2008
self ,
2027
2009
other : Series [S1 ] | Scalar ,
@@ -2352,5 +2334,3 @@ class IntervalSeries(Series[Interval[_OrderableT]], Generic[_OrderableT]):
2352
2334
@property
2353
2335
def array (self ) -> IntervalArray : ...
2354
2336
def diff (self , periods : int = ...) -> Never : ...
2355
-
2356
- UnknownSeries : TypeAlias = Series
0 commit comments