Skip to content

DOC: fix SA01, ES01 for pandas.RangeIndex.step #59857

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 25, 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 @@ -73,7 +73,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Period.freq GL08" \
-i "pandas.Period.ordinal GL08" \
-i "pandas.RangeIndex.from_range PR01,SA01" \
-i "pandas.RangeIndex.step 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
9 changes: 9 additions & 0 deletions pandas/core/indexes/range.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,15 @@ def step(self) -> int:
"""
The value of the `step` parameter (``1`` if this was not supplied).

The ``step`` parameter determines the increment (or decrement in the case
of negative values) between consecutive elements in the ``RangeIndex``.

See Also
--------
RangeIndex : Immutable index implementing a range-based index.
RangeIndex.stop : Returns the stop value of the RangeIndex.
RangeIndex.start : Returns the start value of the RangeIndex.

Examples
--------
>>> idx = pd.RangeIndex(5)
Expand Down