We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71a6797 commit cc56321Copy full SHA for cc56321
pandas/core/series.py
@@ -533,7 +533,7 @@ def __init__(
533
data = data.reindex(index, copy=copy)
534
copy = False
535
data = data._mgr
536
- elif is_dict_like(data):
+ elif isinstance(data, Mapping):
537
data, index = self._init_dict(data, index, dtype)
538
dtype = None
539
@@ -605,7 +605,7 @@ def __init__(
605
)
606
607
def _init_dict(
608
- self, data, index: Index | None = None, dtype: DtypeObj | None = None
+ self, data: Mapping, index: Index | None = None, dtype: DtypeObj | None = None
609
):
610
"""
611
Derive the "_mgr" and "index" attributes of a new Series from a
0 commit comments