Skip to content

Commit b59cb2d

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 dadb76a commit b59cb2d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pandas/core/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3618,7 +3618,7 @@ def map(self, arg, na_action=None):
36183618
36193619
Parameters
36203620
----------
3621-
arg : function, dict, colletions.abc.Mapping subclass or Series
3621+
arg : function, colletions.abc.Mapping subclass or Series
36223622
Mapping correspondence.
36233623
na_action : {None, 'ignore'}, default None
36243624
If 'ignore', propagate NaN values, without passing them to the

pandas/tests/series/test_apply.py

+4
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,8 @@ class DictWithoutMissing(dict):
610610
tm.assert_series_equal(result, expected)
611611

612612
def test_map_abc_mapping(self):
613+
# https://github.com/pandas-dev/pandas/issues/29733
614+
# Check collections.abc.Mapping support as mapper for Series.map
613615
class NonDictMapping(abc.Mapping):
614616
def __init__(self):
615617
self._data = {3: "three"}
@@ -630,6 +632,8 @@ def __len__(self):
630632
tm.assert_series_equal(result, expected)
631633

632634
def test_map_abc_mapping_with_missing(self):
635+
# https://github.com/pandas-dev/pandas/issues/29733
636+
# Check collections.abc.Mapping support as mapper for Series.map
633637
class NonDictMappingWithMissing(abc.Mapping):
634638
def __init__(self):
635639
self._data = {3: "three"}

0 commit comments

Comments
 (0)