Skip to content

Commit b30f6ca

Browse files
tuhinsharma121ammar-qazi
authored andcommitted
DOC: fix SA01,ES01 for pandas.RangeIndex.stop (pandas-dev#59729)
* DOC: fix SA01,ES01 for pandas.RangeIndex.stop * remove superfluous description of RangeIndex
1 parent f111fbd commit b30f6ca

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7777
-i "pandas.RangeIndex.from_range PR01,SA01" \
7878
-i "pandas.RangeIndex.start SA01" \
7979
-i "pandas.RangeIndex.step SA01" \
80-
-i "pandas.RangeIndex.stop SA01" \
8180
-i "pandas.Series.cat.add_categories PR01,PR02" \
8281
-i "pandas.Series.cat.as_ordered PR01" \
8382
-i "pandas.Series.cat.as_unordered PR01" \

pandas/core/indexes/range.py

+11
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,17 @@ 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.
320+
321+
See Also
322+
--------
323+
RangeIndex : Immutable index representing a range of integers.
324+
RangeIndex.start : The start value of the RangeIndex.
325+
RangeIndex.step : The step size between elements in the RangeIndex.
326+
316327
Examples
317328
--------
318329
>>> idx = pd.RangeIndex(5)

0 commit comments

Comments
 (0)