Skip to content

Commit 969b4f9

Browse files
committed
BUG - Fixed Series.map to work with no-missing ABC Mapping
1 parent d93e7e9 commit 969b4f9

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
@@ -5,6 +5,7 @@
55
from shutil import get_terminal_size
66
from textwrap import dedent
77
from typing import Any, Callable, Hashable, List, Optional
8+
from collections import abc
89
import warnings
910

1011
import numpy as np
@@ -192,7 +193,6 @@ class Series(base.IndexOpsMixin, generic.NDFrame):
192193
def __init__(
193194
self, data=None, index=None, dtype=None, name=None, copy=False, fastpath=False
194195
):
195-
196196
# we are called internally, so short-circuit
197197
if fastpath:
198198

@@ -253,7 +253,7 @@ def __init__(
253253
else:
254254
data = data.reindex(index, copy=copy)
255255
data = data._data
256-
elif isinstance(data, dict):
256+
elif isinstance(data, abc.Mapping):
257257
data, index = self._init_dict(data, index, dtype)
258258
dtype = None
259259
copy = False

0 commit comments

Comments
 (0)