Skip to content

DOC: fix SA01,ES01 for pandas.RangeIndex.stop #59729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
11 changes: 11 additions & 0 deletions pandas/core/indexes/range.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we make this just 2 sentences? I think the information describing the RangeIndex is superfluous.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

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)
Expand Down
Loading