Skip to content

Commit d823d5d

Browse files
ohad83jreback
authored andcommitted
DOC - Removed superfluous 'dict' from Series.map argument description
DOC - Added issue number for tests of Series.map with abc.Mapping argument
1 parent 64df513 commit d823d5d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pandas/core/series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3515,7 +3515,7 @@ def map(self, arg, na_action=None):
35153515
35163516
Parameters
35173517
----------
3518-
arg : function, dict, colletions.abc.Mapping subclass or Series
3518+
arg : function, colletions.abc.Mapping subclass or Series
35193519
Mapping correspondence.
35203520
na_action : {None, 'ignore'}, default None
35213521
If 'ignore', propagate NaN values, without passing them to the

pandas/tests/series/test_apply.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,8 @@ class DictWithoutMissing(dict):
628628
tm.assert_series_equal(result, expected)
629629

630630
def test_map_abc_mapping(self):
631+
# https://github.com/pandas-dev/pandas/issues/29733
632+
# Check collections.abc.Mapping support as mapper for Series.map
631633
class NonDictMapping(abc.Mapping):
632634
def __init__(self):
633635
self._data = {3: "three"}
@@ -648,6 +650,8 @@ def __len__(self):
648650
tm.assert_series_equal(result, expected)
649651

650652
def test_map_abc_mapping_with_missing(self):
653+
# https://github.com/pandas-dev/pandas/issues/29733
654+
# Check collections.abc.Mapping support as mapper for Series.map
651655
class NonDictMappingWithMissing(abc.Mapping):
652656
def __init__(self):
653657
self._data = {3: "three"}

0 commit comments

Comments
 (0)