Skip to content

Commit a5be925

Browse files
ohad83jreback
authored andcommitted
BUG - Fixed Series.map to work with no-missing ABC Mapping
1 parent 8bbe838 commit a5be925

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/series.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
from io import StringIO
55
from shutil import get_terminal_size
66
from textwrap import dedent
7-
from typing import IO, Any, Callable, Hashable, List, Optional
7+
from typing import Any, Callable, Hashable, List, Optional
8+
from collections import abc
89
import warnings
910

1011
import numpy as np
@@ -250,7 +251,7 @@ def __init__(
250251
else:
251252
data = data.reindex(index, copy=copy)
252253
data = data._data
253-
elif isinstance(data, dict):
254+
elif isinstance(data, abc.Mapping):
254255
data, index = self._init_dict(data, index, dtype)
255256
dtype = None
256257
copy = False

0 commit comments

Comments
 (0)