We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e982e1 commit e2e6f39Copy full SHA for e2e6f39
pandas/core/indexes/base.py
@@ -3148,8 +3148,12 @@ def droplevel(self, level=0):
3148
3149
Examples
3150
--------
3151
- >>> indexer = index.get_indexer(new_index)
3152
- >>> new_values = cur_values.take(indexer)
+ >>> index = Index(['c', 'a', 'b'])
+ >>> index.get_indexer(['a', 'b', 'x'])
3153
+ array([ 1, 2, -1], dtype=int32)
3154
+
3155
+ Notice that the return value is an array of locations in ``index``
3156
+ and ``x`` is marked by -1, as it is not in ``index``.
3157
3158
Returns
3159
-------
0 commit comments