diff --git a/ci/code_checks.sh b/ci/code_checks.sh index fcbeb20d083d6..ecf5cab080539 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -78,7 +78,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.RangeIndex.from_range PR01,SA01" \ -i "pandas.RangeIndex.start SA01" \ -i "pandas.RangeIndex.step SA01" \ - -i "pandas.RangeIndex.stop SA01" \ -i "pandas.Series.cat.add_categories PR01,PR02" \ -i "pandas.Series.cat.as_ordered PR01" \ -i "pandas.Series.cat.as_unordered PR01" \ diff --git a/pandas/core/indexes/range.py b/pandas/core/indexes/range.py index b11ce6bd7b919..154e142c41db2 100644 --- a/pandas/core/indexes/range.py +++ b/pandas/core/indexes/range.py @@ -313,6 +313,17 @@ def stop(self) -> int: """ The value of the `stop` parameter. + This property returns the `stop` value of the RangeIndex, which defines the + upper (or lower, in case of negative steps) bound of the index range. The + `stop` value is exclusive, meaning the RangeIndex includes values up to but + not including this value. + + See Also + -------- + RangeIndex : Immutable index representing a range of integers. + RangeIndex.start : The start value of the RangeIndex. + RangeIndex.step : The step size between elements in the RangeIndex. + Examples -------- >>> idx = pd.RangeIndex(5)