Skip to content

Commit 2e7fa91

Browse files
DOC: Enforce Numpy Docstring Validation for pandas.Index.sliece_indexer (#58490)
* DOC: add PR07,RT03 in pandas.Index.slice_indexer * DOC: add SA01 in pandas.Index.slice_indexer * DOC: remove pandas.Index.slice_indexer
1 parent f290985 commit 2e7fa91

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
101101
-i "pandas.Index.names GL08" \
102102
-i "pandas.Index.putmask PR01,RT03" \
103103
-i "pandas.Index.ravel PR01,RT03" \
104-
-i "pandas.Index.slice_indexer PR07,RT03,SA01" \
105104
-i "pandas.Index.str PR01,SA01" \
106105
-i "pandas.Index.view GL08" \
107106
-i "pandas.Int16Dtype SA01" \

pandas/core/indexes/base.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -6342,19 +6342,26 @@ def slice_indexer(
63426342
end : label, default None
63436343
If None, defaults to the end.
63446344
step : int, default None
6345+
If None, defaults to 1.
63456346
63466347
Returns
63476348
-------
63486349
slice
6350+
A slice object.
63496351
63506352
Raises
63516353
------
63526354
KeyError : If key does not exist, or key is not unique and index is
63536355
not ordered.
63546356
6357+
See Also
6358+
--------
6359+
Index.slice_locs : Computes slice locations for input labels.
6360+
Index.get_slice_bound : Retrieves slice bound that corresponds to given label.
6361+
63556362
Notes
63566363
-----
6357-
This function assumes that the data is sorted, so use at your own peril
6364+
This function assumes that the data is sorted, so use at your own peril.
63586365
63596366
Examples
63606367
--------

0 commit comments

Comments
 (0)