Skip to content

Commit e88d8c0

Browse files
committed
DOC - Removed superfluous 'dict' from Series.map argument description
DOC - Added issue number for tests of Series.map with abc.Mapping argument
1 parent 9d181c6 commit e88d8c0

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
@@ -3421,7 +3421,7 @@ def map(self, arg, na_action=None):
34213421
34223422
Parameters
34233423
----------
3424-
arg : function, dict, colletions.abc.Mapping subclass or Series
3424+
arg : function, colletions.abc.Mapping subclass or Series
34253425
Mapping correspondence.
34263426
na_action : {None, 'ignore'}, default None
34273427
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
@@ -613,6 +613,8 @@ class DictWithoutMissing(dict):
613613
tm.assert_series_equal(result, expected)
614614

615615
def test_map_abc_mapping(self):
616+
# https://github.com/pandas-dev/pandas/issues/29733
617+
# Check collections.abc.Mapping support as mapper for Series.map
616618
class NonDictMapping(abc.Mapping):
617619
def __init__(self):
618620
self._data = {3: "three"}
@@ -633,6 +635,8 @@ def __len__(self):
633635
tm.assert_series_equal(result, expected)
634636

635637
def test_map_abc_mapping_with_missing(self):
638+
# https://github.com/pandas-dev/pandas/issues/29733
639+
# Check collections.abc.Mapping support as mapper for Series.map
636640
class NonDictMappingWithMissing(abc.Mapping):
637641
def __init__(self):
638642
self._data = {3: "three"}

0 commit comments

Comments
 (0)