Skip to content

Commit 3479160

Browse files
tuhinsharma121pmhatre1
authored andcommitted
DOC: Enforce Numpy Docstring Validation for pandas.Index.sliece_indexer (pandas-dev#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 6269607 commit 3479160

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
@@ -6323,19 +6323,26 @@ def slice_indexer(
63236323
end : label, default None
63246324
If None, defaults to the end.
63256325
step : int, default None
6326+
If None, defaults to 1.
63266327
63276328
Returns
63286329
-------
63296330
slice
6331+
A slice object.
63306332
63316333
Raises
63326334
------
63336335
KeyError : If key does not exist, or key is not unique and index is
63346336
not ordered.
63356337
6338+
See Also
6339+
--------
6340+
Index.slice_locs : Computes slice locations for input labels.
6341+
Index.get_slice_bound : Retrieves slice bound that corresponds to given label.
6342+
63366343
Notes
63376344
-----
6338-
This function assumes that the data is sorted, so use at your own peril
6345+
This function assumes that the data is sorted, so use at your own peril.
63396346
63406347
Examples
63416348
--------

0 commit comments

Comments
 (0)