11from collections .abc import (
22 Callable ,
33 Hashable ,
4+ Iterable ,
45 Sequence ,
56)
67from typing import (
@@ -16,6 +17,7 @@ from pandas.core.indexes.base import Index
1617from typing_extensions import Self
1718
1819from pandas ._typing import (
20+ AnyArrayLike ,
1921 Dtype ,
2022 DtypeArg ,
2123 HashableT ,
@@ -27,31 +29,42 @@ from pandas._typing import (
2729class MultiIndex (Index [Any ]):
2830 def __new__ (
2931 cls ,
30- levels = ...,
31- codes = ...,
32- sortorder = ...,
32+ levels : SequenceNotStr [ SequenceNotStr [ Hashable ]] = ...,
33+ codes : SequenceNotStr [ SequenceNotStr [ int ]] = ...,
34+ sortorder : int | None = ...,
3335 names : SequenceNotStr [Hashable ] = ...,
34- dtype = ...,
35- copy = ...,
36+ copy : bool = ...,
3637 name : SequenceNotStr [Hashable ] = ...,
3738 verify_integrity : bool = ...,
3839 _set_identity : bool = ...,
3940 ) -> Self : ...
4041 @classmethod
4142 def from_arrays (
42- cls , arrays , sortorder = ..., names : SequenceNotStr [Hashable ] = ...
43+ cls ,
44+ arrays : SequenceNotStr [SequenceNotStr [Hashable ]] | SequenceNotStr [AnyArrayLike ],
45+ sortorder : int | None = ...,
46+ names : SequenceNotStr [Hashable ] = ...,
4347 ) -> Self : ...
4448 @classmethod
4549 def from_tuples (
46- cls , tuples , sortorder = ..., names : SequenceNotStr [Hashable ] = ...
50+ cls ,
51+ tuples : Iterable [tuple [Hashable , ...]],
52+ sortorder : int | None = ...,
53+ names : SequenceNotStr [Hashable ] = ...,
4754 ) -> Self : ...
4855 @classmethod
4956 def from_product (
50- cls , iterables , sortorder = ..., names : SequenceNotStr [Hashable ] = ...
57+ cls ,
58+ iterables : SequenceNotStr [Iterable [Hashable ]],
59+ sortorder : int | None = ...,
60+ names : SequenceNotStr [Hashable ] = ...,
5161 ) -> Self : ...
5262 @classmethod
5363 def from_frame (
54- cls , df , sortorder = ..., names : SequenceNotStr [Hashable ] = ...
64+ cls ,
65+ df : pd .DataFrame ,
66+ sortorder : int | None = ...,
67+ names : SequenceNotStr [Hashable ] = ...,
5568 ) -> Self : ...
5669 @property
5770 def shape (self ): ...
0 commit comments