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