diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 161047197ff6f..c1172e1f771d8 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -101,7 +101,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Index.names GL08" \ -i "pandas.Index.putmask PR01,RT03" \ -i "pandas.Index.ravel PR01,RT03" \ - -i "pandas.Index.slice_indexer PR07,RT03,SA01" \ -i "pandas.Index.str PR01,SA01" \ -i "pandas.Index.take PR01,PR07" \ -i "pandas.Index.view GL08" \ diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 2bf0aca31449e..dfacd71471d84 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -6330,19 +6330,26 @@ def slice_indexer( end : label, default None If None, defaults to the end. step : int, default None + If None, defaults to 1. Returns ------- slice + A slice object. Raises ------ KeyError : If key does not exist, or key is not unique and index is not ordered. + See Also + -------- + Index.slice_locs : Computes slice locations for input labels. + Index.get_slice_bound : Retrieves slice bound that corresponds to given label. + Notes ----- - This function assumes that the data is sorted, so use at your own peril + This function assumes that the data is sorted, so use at your own peril. Examples --------