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 eb7fe31 commit 78e9f06Copy full SHA for 78e9f06
pandas/core/series.py
@@ -452,7 +452,7 @@ def __init__(
452
data = data.reindex(index)
453
copy = False
454
data = data._mgr
455
- elif is_dict_like(data):
+ elif isinstance(data, Mapping):
456
data, index = self._init_dict(data, index, dtype)
457
dtype = None
458
@@ -519,7 +519,7 @@ def __init__(
519
)
520
521
def _init_dict(
522
- self, data, index: Index | None = None, dtype: DtypeObj | None = None
+ self, data: Mapping, index: Index | None = None, dtype: DtypeObj | None = None
523
):
524
"""
525
Derive the "_mgr" and "index" attributes of a new Series from a
0 commit comments