File tree 1 file changed +10
-5
lines changed
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):
3148
3148
3149
3149
.. versionadded:: 0.21.0 (list-like tolerance)
3150
3150
3151
- Examples
3152
- --------
3153
- >>> indexer = index.get_indexer(new_index)
3154
- >>> new_values = cur_values.take(indexer)
3155
-
3156
3151
Returns
3157
3152
-------
3158
3153
indexer : ndarray of int
3159
3154
Integers from 0 to n - 1 indicating that the index at these
3160
3155
positions matches the corresponding target values. Missing values
3161
3156
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
+
3162
3167
"""
3163
3168
3164
3169
@Appender (_index_shared_docs ['get_indexer' ] % _index_doc_kwargs )
You can’t perform that action at this time.
0 commit comments