|
10 | 10 | from pandas._libs.hashtable import duplicated_int64 |
11 | 11 | import pandas.compat as compat |
12 | 12 | from pandas.compat.numpy import function as nv |
13 | | -from pandas.util._decorators import Appender, cache_readonly |
| 13 | +from pandas.util._decorators import Appender, Substitution, cache_readonly |
14 | 14 |
|
15 | 15 | from pandas.core.dtypes.common import ( |
16 | 16 | ensure_platform_int, |
|
27 | 27 | from pandas.core import accessor |
28 | 28 | from pandas.core.algorithms import take_1d |
29 | 29 | from pandas.core.arrays.categorical import Categorical, _recode_for_categories, contains |
| 30 | +from pandas.core.base import _shared_docs |
30 | 31 | import pandas.core.common as com |
31 | 32 | import pandas.core.indexes.base as ibase |
32 | 33 | from pandas.core.indexes.base import Index, _index_shared_docs |
@@ -555,6 +556,11 @@ def _can_reindex(self, indexer): |
555 | 556 | """ always allow reindexing """ |
556 | 557 | pass |
557 | 558 |
|
| 559 | + @Substitution(klass="CategoricalIndex") |
| 560 | + @Appender(_shared_docs["searchsorted"]) |
| 561 | + def searchsorted(self, value, side="left", sorter=None): |
| 562 | + return self._data.searchsorted(value, side=side, sorter=sorter) |
| 563 | + |
558 | 564 | @Appender(_index_shared_docs["where"]) |
559 | 565 | def where(self, cond, other=None): |
560 | 566 | # TODO: Investigate an alternative implementation with |
|
0 commit comments