Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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`.
Copy link
Member

Choose a reason for hiding this comment

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

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

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!


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
Loading