@@ -71,6 +71,7 @@ from typing_extensions import (
71
71
)
72
72
import xarray as xr
73
73
74
+ from pandas ._libs .interval import Interval
74
75
from pandas ._libs .missing import NAType
75
76
from pandas ._libs .tslibs import BaseOffset
76
77
from pandas ._typing import (
@@ -95,7 +96,6 @@ from pandas._typing import (
95
96
IgnoreRaise ,
96
97
IndexingInt ,
97
98
IntervalClosedType ,
98
- IntervalT ,
99
99
JoinHow ,
100
100
JsonSeriesOrient ,
101
101
Level ,
@@ -217,13 +217,43 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
217
217
@overload
218
218
def __new__ (
219
219
cls ,
220
- data : IntervalIndex [IntervalT ],
220
+ data : IntervalIndex [Interval [ int ] ],
221
221
index : Axes | None = ...,
222
222
dtype = ...,
223
223
name : Hashable | None = ...,
224
224
copy : bool = ...,
225
225
fastpath : bool = ...,
226
- ) -> Series [IntervalT ]: ...
226
+ ) -> Series [Interval [int ]]: ...
227
+ @overload
228
+ def __new__ (
229
+ cls ,
230
+ data : IntervalIndex [Interval [float ]],
231
+ index : Axes | None = ...,
232
+ dtype = ...,
233
+ name : Hashable | None = ...,
234
+ copy : bool = ...,
235
+ fastpath : bool = ...,
236
+ ) -> Series [Interval [float ]]: ...
237
+ @overload
238
+ def __new__ (
239
+ cls ,
240
+ data : IntervalIndex [Interval [Timestamp ]],
241
+ index : Axes | None = ...,
242
+ dtype = ...,
243
+ name : Hashable | None = ...,
244
+ copy : bool = ...,
245
+ fastpath : bool = ...,
246
+ ) -> Series [Interval [Timestamp ]]: ...
247
+ @overload
248
+ def __new__ (
249
+ cls ,
250
+ data : IntervalIndex [Interval [Timedelta ]],
251
+ index : Axes | None = ...,
252
+ dtype = ...,
253
+ name : Hashable | None = ...,
254
+ copy : bool = ...,
255
+ fastpath : bool = ...,
256
+ ) -> Series [Interval [Timedelta ]]: ...
227
257
@overload
228
258
def __new__ (
229
259
cls ,
0 commit comments