Skip to content

Commit 78e9f06

Browse files
authored
BUG: Handle Series construction with Dask, dict-like, Series (#57889)
1 parent eb7fe31 commit 78e9f06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/series.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ def __init__(
452452
data = data.reindex(index)
453453
copy = False
454454
data = data._mgr
455-
elif is_dict_like(data):
455+
elif isinstance(data, Mapping):
456456
data, index = self._init_dict(data, index, dtype)
457457
dtype = None
458458
copy = False
@@ -519,7 +519,7 @@ def __init__(
519519
)
520520

521521
def _init_dict(
522-
self, data, index: Index | None = None, dtype: DtypeObj | None = None
522+
self, data: Mapping, index: Index | None = None, dtype: DtypeObj | None = None
523523
):
524524
"""
525525
Derive the "_mgr" and "index" attributes of a new Series from a

0 commit comments

Comments
 (0)