|
12 | 12 | from pandas.compat import PYPY
|
13 | 13 | from pandas.compat.numpy import function as nv
|
14 | 14 | from pandas.errors import AbstractMethodError
|
15 |
| -from pandas.util._decorators import Appender, Substitution, cache_readonly, doc |
| 15 | +from pandas.util._decorators import cache_readonly, doc |
16 | 16 | from pandas.util._validators import validate_bool_kwarg
|
17 | 17 |
|
18 | 18 | from pandas.core.dtypes.cast import is_nested_object
|
@@ -1425,21 +1425,21 @@ def factorize(self, sort=False, na_sentinel=-1):
|
1425 | 1425 | ] = """
|
1426 | 1426 | Find indices where elements should be inserted to maintain order.
|
1427 | 1427 |
|
1428 |
| - Find the indices into a sorted %(klass)s `self` such that, if the |
| 1428 | + Find the indices into a sorted {klass} `self` such that, if the |
1429 | 1429 | corresponding elements in `value` were inserted before the indices,
|
1430 | 1430 | the order of `self` would be preserved.
|
1431 | 1431 |
|
1432 | 1432 | .. note::
|
1433 | 1433 |
|
1434 |
| - The %(klass)s *must* be monotonically sorted, otherwise |
| 1434 | + The {klass} *must* be monotonically sorted, otherwise |
1435 | 1435 | wrong locations will likely be returned. Pandas does *not*
|
1436 | 1436 | check this for you.
|
1437 | 1437 |
|
1438 | 1438 | Parameters
|
1439 | 1439 | ----------
|
1440 | 1440 | value : array_like
|
1441 | 1441 | Values to insert into `self`.
|
1442 |
| - side : {'left', 'right'}, optional |
| 1442 | + side : {{'left', 'right'}}, optional |
1443 | 1443 | If 'left', the index of the first suitable location found is given.
|
1444 | 1444 | If 'right', return the last such index. If there is no suitable
|
1445 | 1445 | index, return either 0 or N (where N is the length of `self`).
|
@@ -1515,8 +1515,7 @@ def factorize(self, sort=False, na_sentinel=-1):
|
1515 | 1515 | 0 # wrong result, correct would be 1
|
1516 | 1516 | """
|
1517 | 1517 |
|
1518 |
| - @Substitution(klass="Index") |
1519 |
| - @Appender(_shared_docs["searchsorted"]) |
| 1518 | + @doc(_shared_docs["searchsorted"], klass="Index") |
1520 | 1519 | def searchsorted(self, value, side="left", sorter=None) -> np.ndarray:
|
1521 | 1520 | return algorithms.searchsorted(self._values, value, side=side, sorter=sorter)
|
1522 | 1521 |
|
|
0 commit comments