We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f06c37c commit 375379dCopy full SHA for 375379d
pandas/core/dtypes/cast.py
@@ -88,6 +88,7 @@
88
89
if TYPE_CHECKING:
90
from collections.abc import (
91
+ Mapping,
92
Sequence,
93
Sized,
94
)
@@ -861,13 +862,13 @@ def infer_dtype_from_scalar(val) -> tuple[DtypeObj, Any]:
861
862
return dtype, val
863
864
-def dict_compat(d: dict[Scalar, Scalar]) -> dict[Scalar, Scalar]:
865
+def dict_compat(d: Mapping[Scalar, Scalar]) -> dict[Scalar, Scalar]:
866
"""
- Convert datetimelike-keyed dicts to a Timestamp-keyed dict.
867
+ Convert datetimelike-keyed Mappings to a Timestamp-keyed dict.
868
869
Parameters
870
----------
- d: dict-like object
871
+ d: Mapping object
872
873
Returns
874
-------
0 commit comments