File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -3148,17 +3148,22 @@ def droplevel(self, level=0):
31483148
31493149 .. versionadded:: 0.21.0 (list-like tolerance)
31503150
3151- Examples
3152- --------
3153- >>> indexer = index.get_indexer(new_index)
3154- >>> new_values = cur_values.take(indexer)
3155-
31563151 Returns
31573152 -------
31583153 indexer : ndarray of int
31593154 Integers from 0 to n - 1 indicating that the index at these
31603155 positions matches the corresponding target values. Missing values
31613156 in the target are marked by -1.
3157+
3158+ Examples
3159+ --------
3160+ >>> index = pd.Index(['c', 'a', 'b'])
3161+ >>> index.get_indexer(['a', 'b', 'x'])
3162+ array([ 1, 2, -1])
3163+
3164+ Notice that the return value is an array of locations in ``index``
3165+ and ``x`` is marked by -1, as it is not in ``index``.
3166+
31623167 """
31633168
31643169 @Appender (_index_shared_docs ['get_indexer' ] % _index_doc_kwargs )
You can’t perform that action at this time.
0 commit comments