diff --git a/pandas/core/series.py b/pandas/core/series.py index 699ff413efb91..8a7c1531205e0 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -452,7 +452,7 @@ def __init__( data = data.reindex(index) copy = False data = data._mgr - elif is_dict_like(data): + elif isinstance(data, Mapping): data, index = self._init_dict(data, index, dtype) dtype = None copy = False @@ -519,7 +519,7 @@ def __init__( ) def _init_dict( - self, data, index: Index | None = None, dtype: DtypeObj | None = None + self, data: Mapping, index: Index | None = None, dtype: DtypeObj | None = None ): """ Derive the "_mgr" and "index" attributes of a new Series from a