Skip to content

Commit 5695491

Browse files
committed
DOC: Replace @doc decorator with inline docstring in pandas/core/algorithms.py
1 parent 3da6b7d commit 5695491

File tree

1 file changed

+9
-29
lines changed

1 file changed

+9
-29
lines changed

pandas/core/algorithms.py

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import decimal
99
import operator
10-
from textwrap import dedent
1110
from typing import (
1211
TYPE_CHECKING,
1312
Literal,
@@ -35,10 +34,7 @@
3534
TakeIndexer,
3635
npt,
3736
)
38-
from pandas.util._decorators import (
39-
doc,
40-
set_module,
41-
)
37+
from pandas.util._decorators import set_module
4238
from pandas.util._exceptions import find_stack_level
4339

4440
from pandas.core.dtypes.cast import (
@@ -654,28 +650,6 @@ def factorize_array(
654650

655651

656652
@set_module("pandas")
657-
@doc(
658-
values=dedent(
659-
"""\
660-
values : sequence
661-
A 1-D sequence. Sequences that aren't pandas objects are
662-
coerced to ndarrays before factorization.
663-
"""
664-
),
665-
sort=dedent(
666-
"""\
667-
sort : bool, default False
668-
Sort `uniques` and shuffle `codes` to maintain the
669-
relationship.
670-
"""
671-
),
672-
size_hint=dedent(
673-
"""\
674-
size_hint : int, optional
675-
Hint to the hashtable sizer.
676-
"""
677-
),
678-
)
679653
def factorize(
680654
values,
681655
sort: bool = False,
@@ -692,12 +666,18 @@ def factorize(
692666
693667
Parameters
694668
----------
695-
{values}{sort}
669+
values : sequence
670+
A 1-D sequence. Sequences that aren't pandas objects are
671+
coerced to ndarrays before factorization.
672+
sort : bool, default False
673+
Sort `uniques` and shuffle `codes` to maintain the
674+
relationship.
696675
use_na_sentinel : bool, default True
697676
If True, the sentinel -1 will be used for NaN values. If False,
698677
NaN values will be encoded as non-negative integers and will not drop the
699678
NaN from the uniques of the values.
700-
{size_hint}\
679+
size_hint : int, optional
680+
Hint to the hashtable sizer.
701681
702682
Returns
703683
-------

0 commit comments

Comments
 (0)