Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pandas-stubs/core/indexes/multi.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections.abc import (
Callable,
Hashable,
Iterable,
Sequence,
)
from typing import (
Expand Down Expand Up @@ -46,7 +47,7 @@ class MultiIndex(Index[Any]):
@classmethod
def from_tuples(
cls,
tuples: Sequence[tuple[Hashable, ...]],
tuples: Iterable[tuple[Hashable, ...]],
sortorder: int | None = ...,
names: SequenceNotStr[Hashable] = ...,
) -> Self: ...
Expand Down
4 changes: 4 additions & 0 deletions tests/test_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ def test_multiindex_constructors() -> None:
),
pd.MultiIndex,
)
check(
assert_type(pd.MultiIndex.from_tuples(zip([1, 2], [3, 4])), pd.MultiIndex),
pd.MultiIndex,
)
check(
assert_type(pd.MultiIndex.from_tuples([(1, 3), (2, 4)]), pd.MultiIndex),
pd.MultiIndex,
Expand Down