Skip to content

Commit a57fc32

Browse files
DOC: fix SA01,ES01 for pandas.RangeIndex.stop
1 parent 3a45265 commit a57fc32

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7878
-i "pandas.RangeIndex.from_range PR01,SA01" \
7979
-i "pandas.RangeIndex.start SA01" \
8080
-i "pandas.RangeIndex.step SA01" \
81-
-i "pandas.RangeIndex.stop SA01" \
8281
-i "pandas.Series.cat.add_categories PR01,PR02" \
8382
-i "pandas.Series.cat.as_ordered PR01" \
8483
-i "pandas.Series.cat.as_unordered PR01" \

pandas/core/indexes/range.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,20 @@ def stop(self) -> int:
313313
"""
314314
The value of the `stop` parameter.
315315
316+
This property returns the `stop` value of the RangeIndex, which defines the
317+
upper (or lower, in case of negative steps) bound of the index range. The
318+
`stop` value is exclusive, meaning the RangeIndex includes values up to but
319+
not including this value. This property complements the `start` and `step`
320+
properties that, together with `stop`, describe the entire range. The
321+
`RangeIndex` is commonly used in performance-critical scenarios because it
322+
doesn't store individual values, only the range metadata.
323+
324+
See Also
325+
--------
326+
RangeIndex : Immutable index representing a range of integers.
327+
RangeIndex.start : The start value of the RangeIndex.
328+
RangeIndex.step : The step size between elements in the RangeIndex.
329+
316330
Examples
317331
--------
318332
>>> idx = pd.RangeIndex(5)

0 commit comments

Comments
 (0)