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
9 changes: 5 additions & 4 deletions narwhals/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing import Any
from typing import Iterable
from typing import Literal
from typing import Mapping
from typing import Protocol
from typing import Sequence
from typing import TypeVar
Expand Down Expand Up @@ -291,8 +292,8 @@ def _new_series_impl(


def from_dict(
data: dict[str, Any],
schema: dict[str, DType] | Schema | None = None,
data: Mapping[str, Any],
schema: Mapping[str, DType] | Schema | None = None,
*,
backend: ModuleType | Implementation | str | None = None,
native_namespace: ModuleType | None = None,
Expand Down Expand Up @@ -348,8 +349,8 @@ def from_dict(


def _from_dict_impl(
data: dict[str, Any],
schema: dict[str, DType] | Schema | None = None,
data: Mapping[str, Any],
schema: Mapping[str, DType] | Schema | None = None,
*,
backend: ModuleType | Implementation | str | None = None,
) -> DataFrame[Any]:
Expand Down
5 changes: 3 additions & 2 deletions narwhals/stable/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@

if TYPE_CHECKING:
from types import ModuleType
from typing import Mapping

from typing_extensions import Self

Expand Down Expand Up @@ -2169,8 +2170,8 @@ def from_arrow(


def from_dict(
data: dict[str, Any],
schema: dict[str, DType] | Schema | None = None,
data: Mapping[str, Any],
schema: Mapping[str, DType] | Schema | None = None,
*,
backend: ModuleType | Implementation | str | None = None,
native_namespace: ModuleType | None = None,
Expand Down
Loading