Skip to content

Commit 057c6f8

Browse files
authored
DOC: Added sentence to show that unmatched values return -1. (#43738)
* Added sentence to show that unmatched values return -1 * Fixed PEP 8 issues * Added note * Added to notes section * removed blank line
1 parent d88d27c commit 057c6f8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/core/indexes/base.py

+5
Original file line numberDiff line numberDiff line change
@@ -3578,6 +3578,11 @@ def get_loc(self, key, method=None, tolerance=None):
35783578
positions matches the corresponding target values. Missing values
35793579
in the target are marked by -1.
35803580
%(raises_section)s
3581+
Notes
3582+
-----
3583+
Returns -1 for unmatched values, for further explanation see the
3584+
example below.
3585+
35813586
Examples
35823587
--------
35833588
>>> index = pd.Index(['c', 'a', 'b'])

0 commit comments

Comments
 (0)