Skip to content

Commit f5b3d7c

Browse files
DOC: Fix EX02 in pandas.Series.factorize (#32901)
1 parent 49bc8d8 commit f5b3d7c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pandas/core/algorithms.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def factorize(
556556
557557
>>> codes, uniques = pd.factorize(['b', 'b', 'a', 'c', 'b'])
558558
>>> codes
559-
array([0, 0, 1, 2, 0])
559+
array([0, 0, 1, 2, 0]...)
560560
>>> uniques
561561
array(['b', 'a', 'c'], dtype=object)
562562
@@ -565,7 +565,7 @@ def factorize(
565565
566566
>>> codes, uniques = pd.factorize(['b', 'b', 'a', 'c', 'b'], sort=True)
567567
>>> codes
568-
array([1, 1, 0, 2, 1])
568+
array([1, 1, 0, 2, 1]...)
569569
>>> uniques
570570
array(['a', 'b', 'c'], dtype=object)
571571
@@ -575,7 +575,7 @@ def factorize(
575575
576576
>>> codes, uniques = pd.factorize(['b', None, 'a', 'c', 'b'])
577577
>>> codes
578-
array([ 0, -1, 1, 2, 0])
578+
array([ 0, -1, 1, 2, 0]...)
579579
>>> uniques
580580
array(['b', 'a', 'c'], dtype=object)
581581
@@ -586,7 +586,7 @@ def factorize(
586586
>>> cat = pd.Categorical(['a', 'a', 'c'], categories=['a', 'b', 'c'])
587587
>>> codes, uniques = pd.factorize(cat)
588588
>>> codes
589-
array([0, 0, 1])
589+
array([0, 0, 1]...)
590590
>>> uniques
591591
[a, c]
592592
Categories (3, object): [a, b, c]
@@ -600,7 +600,7 @@ def factorize(
600600
>>> cat = pd.Series(['a', 'a', 'c'])
601601
>>> codes, uniques = pd.factorize(cat)
602602
>>> codes
603-
array([0, 0, 1])
603+
array([0, 0, 1]...)
604604
>>> uniques
605605
Index(['a', 'c'], dtype='object')
606606
"""

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ markers =
6060
db: tests requiring a database (mysql or postgres)
6161
high_memory: mark a test as a high-memory only
6262
clipboard: mark a pd.read_clipboard test
63-
doctest_optionflags = NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL
63+
doctest_optionflags = NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ELLIPSIS
6464
addopts = --strict-data-files
6565
xfail_strict = True
6666
filterwarnings =

0 commit comments

Comments
 (0)