Skip to content

Commit 5e348a1

Browse files
committed
DOC: fix doctest in categorical.map by removing SKIP markers
1 parent 4503bb3 commit 5e348a1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pandas/core/arrays/categorical.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,15 +1590,16 @@ def map(
15901590
therefore only called once per unique category, and the result reused for
15911591
all occurrences:
15921592
1593-
>>> cat = pd.Categorical(["a", "a", "b"]) # doctest: +SKIP
1594-
>>> calls = [] # doctest: +SKIP
1595-
>>> def f(x): # doctest: +SKIP
1593+
>>> cat = pd.Categorical(["a", "a", "b"])
1594+
>>> calls = []
1595+
>>> def f(x):
15961596
... calls.append(x)
15971597
... return x.upper()
1598-
>>> cat.map(f)
1598+
>>> result = cat.map(f)
1599+
>>> result
15991600
['A', 'A', 'B']
16001601
Categories (2, str): ['A', 'B']
1601-
>>> calls # doctest: +SKIP
1602+
>>> calls
16021603
['a', 'b']
16031604
"""
16041605
assert callable(mapper) or is_dict_like(mapper)

0 commit comments

Comments
 (0)