1
+ from typing import Hashable
2
+
1
3
import numpy as np
2
- from pandas .core .indexes .base import Index
3
4
from pandas .core .indexes .extension import ExtensionIndex
4
5
5
6
from pandas ._libs .interval import (
6
7
Interval as Interval ,
7
8
IntervalMixin as IntervalMixin ,
8
9
)
9
- from pandas ._typing import DtypeArg
10
+ from pandas ._typing import (
11
+ DtypeArg ,
12
+ IntervalClosedType ,
13
+ )
10
14
15
+ from pandas .core .dtypes .dtypes import IntervalDtype as IntervalDtype
11
16
from pandas .core .dtypes .generic import ABCSeries as ABCSeries
12
17
13
18
class SetopCheck :
@@ -19,38 +24,46 @@ class IntervalIndex(IntervalMixin, ExtensionIndex):
19
24
def __new__ (
20
25
cls ,
21
26
data ,
22
- closed = ...,
23
- dtype = ...,
27
+ closed : IntervalClosedType = ...,
28
+ dtype : IntervalDtype | None = ...,
24
29
copy : bool = ...,
25
- name = ...,
30
+ name : Hashable = ...,
26
31
verify_integrity : bool = ...,
27
32
): ...
28
33
@classmethod
29
34
def from_breaks (
30
- cls , breaks , closed : str = ..., name = ..., copy : bool = ..., dtype = ...
31
- ): ...
35
+ cls ,
36
+ breaks ,
37
+ closed : IntervalClosedType = ...,
38
+ name : Hashable = ...,
39
+ copy : bool = ...,
40
+ dtype : IntervalDtype | None = ...,
41
+ ) -> IntervalIndex : ...
32
42
@classmethod
33
43
def from_arrays (
34
- cls , left , right , closed : str = ..., name = ..., copy : bool = ..., dtype = ...
35
- ): ...
44
+ cls ,
45
+ left ,
46
+ right ,
47
+ closed : IntervalClosedType = ...,
48
+ name : Hashable = ...,
49
+ copy : bool = ...,
50
+ dtype : IntervalDtype | None = ...,
51
+ ) -> IntervalIndex : ...
36
52
@classmethod
37
53
def from_tuples (
38
- cls , data , closed : str = ..., name = ..., copy : bool = ..., dtype = ...
39
- ): ...
40
- def __contains__ (self , key ) -> bool : ...
41
- def values (self ): ...
42
- def __array_wrap__ (self , result , context = ...): ...
43
- def __reduce__ (self ): ...
44
- def astype (self , dtype : DtypeArg , copy : bool = ...) -> Index : ...
54
+ cls ,
55
+ data ,
56
+ closed : IntervalClosedType = ...,
57
+ name : Hashable = ...,
58
+ copy : bool = ...,
59
+ dtype : IntervalDtype | None = ...,
60
+ ) -> IntervalIndex : ...
61
+ def astype (self , dtype : DtypeArg , copy : bool = ...) -> IntervalIndex : ...
45
62
@property
46
63
def inferred_type (self ) -> str : ...
47
64
def memory_usage (self , deep : bool = ...) -> int : ...
48
- def is_monotonic (self ) -> bool : ...
49
- def is_monotonic_increasing (self ) -> bool : ...
50
- def is_monotonic_decreasing (self ) -> bool : ...
51
- def is_unique (self ): ...
52
65
@property
53
- def is_overlapping (self ): ...
66
+ def is_overlapping (self ) -> bool : ...
54
67
def get_loc (
55
68
self , key , method : str | None = ..., tolerance = ...
56
69
) -> int | slice | np .ndarray : ...
@@ -65,15 +78,6 @@ class IntervalIndex(IntervalMixin, ExtensionIndex):
65
78
self , targetArrayLike
66
79
) -> tuple [np .ndarray , np .ndarray ]: ...
67
80
def get_value (self , series : ABCSeries , key ): ...
68
- def where (self , cond , other = ...): ...
69
- def delete (self , loc ): ...
70
- def insert (self , loc , item ): ...
71
- def take (
72
- self , indices , axis : int = ..., allow_fill : bool = ..., fill_value = ..., ** kwargs
73
- ): ...
74
- def __getitem__ (self , value ): ...
75
- def argsort (self , * args , ** kwargs ): ...
76
- def equals (self , other ) -> bool : ...
77
81
@property
78
82
def is_all_dates (self ) -> bool : ...
79
83
def __lt__ (self , other ): ...
0 commit comments