Skip to content

Commit cc56321

Browse files
Backport PR #57889 on branch 2.2.x (BUG: Handle Series construction with Dask, dict-like, Series) (#57899)
Backport PR #57889: BUG: Handle Series construction with Dask, dict-like, Series Co-authored-by: Matthew Roeschke <[email protected]>
1 parent 71a6797 commit cc56321

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
@@ -533,7 +533,7 @@ def __init__(
533533
data = data.reindex(index, copy=copy)
534534
copy = False
535535
data = data._mgr
536-
elif is_dict_like(data):
536+
elif isinstance(data, Mapping):
537537
data, index = self._init_dict(data, index, dtype)
538538
dtype = None
539539
copy = False
@@ -605,7 +605,7 @@ def __init__(
605605
)
606606

607607
def _init_dict(
608-
self, data, index: Index | None = None, dtype: DtypeObj | None = None
608+
self, data: Mapping, index: Index | None = None, dtype: DtypeObj | None = None
609609
):
610610
"""
611611
Derive the "_mgr" and "index" attributes of a new Series from a

0 commit comments

Comments
 (0)