@@ -16,6 +16,7 @@ from pandas.core.indexes.base import Index
16
16
from typing_extensions import Self
17
17
18
18
from pandas ._typing import (
19
+ Axes ,
19
20
Dtype ,
20
21
DtypeArg ,
21
22
HashableT ,
@@ -27,31 +28,41 @@ from pandas._typing import (
27
28
class MultiIndex (Index [Any ]):
28
29
def __new__ (
29
30
cls ,
30
- levels = ...,
31
- codes = ...,
32
- sortorder = ...,
31
+ levels : Sequence [ SequenceNotStr [ Hashable ]] = ...,
32
+ codes : Sequence [ Sequence [ int ]] = ...,
33
+ sortorder : int | None = ...,
33
34
names : SequenceNotStr [Hashable ] = ...,
34
- dtype = ...,
35
- copy = ...,
35
+ copy : bool = ...,
36
36
name : SequenceNotStr [Hashable ] = ...,
37
37
verify_integrity : bool = ...,
38
- _set_identity : bool = ...,
39
38
) -> Self : ...
40
39
@classmethod
41
40
def from_arrays (
42
- cls , arrays , sortorder = ..., names : SequenceNotStr [Hashable ] = ...
41
+ cls ,
42
+ arrays : Sequence [Axes ],
43
+ sortorder : int | None = ...,
44
+ names : SequenceNotStr [Hashable ] = ...,
43
45
) -> Self : ...
44
46
@classmethod
45
47
def from_tuples (
46
- cls , tuples , sortorder = ..., names : SequenceNotStr [Hashable ] = ...
48
+ cls ,
49
+ tuples : Sequence [tuple [Hashable , ...]],
50
+ sortorder : int | None = ...,
51
+ names : SequenceNotStr [Hashable ] = ...,
47
52
) -> Self : ...
48
53
@classmethod
49
54
def from_product (
50
- cls , iterables , sortorder = ..., names : SequenceNotStr [Hashable ] = ...
55
+ cls ,
56
+ iterables : Sequence [SequenceNotStr [Hashable ]],
57
+ sortorder : int | None = ...,
58
+ names : SequenceNotStr [Hashable ] = ...,
51
59
) -> Self : ...
52
60
@classmethod
53
61
def from_frame (
54
- cls , df , sortorder = ..., names : SequenceNotStr [Hashable ] = ...
62
+ cls ,
63
+ df : pd .DataFrame ,
64
+ sortorder : int | None = ...,
65
+ names : SequenceNotStr [Hashable ] = ...,
55
66
) -> Self : ...
56
67
@property
57
68
def shape (self ): ...
0 commit comments