Skip to content

Commit 22055e4

Browse files
DOC: fix SA01, ES01 for pandas.RangeIndex.step (#59857)
* DOC: fix SA01, ES01 for pandas.RangeIndex.step * DOC: add double backticks for sphinx compatibility Co-authored-by: mroeschke <[email protected]> --------- Co-authored-by: mroeschke <[email protected]>
1 parent 1ddf028 commit 22055e4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7373
-i "pandas.Period.freq GL08" \
7474
-i "pandas.Period.ordinal GL08" \
7575
-i "pandas.RangeIndex.from_range PR01,SA01" \
76-
-i "pandas.RangeIndex.step SA01" \
7776
-i "pandas.Series.cat.add_categories PR01,PR02" \
7877
-i "pandas.Series.cat.as_ordered PR01" \
7978
-i "pandas.Series.cat.as_unordered PR01" \

pandas/core/indexes/range.py

+9
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,15 @@ def step(self) -> int:
351351
"""
352352
The value of the `step` parameter (``1`` if this was not supplied).
353353
354+
The ``step`` parameter determines the increment (or decrement in the case
355+
of negative values) between consecutive elements in the ``RangeIndex``.
356+
357+
See Also
358+
--------
359+
RangeIndex : Immutable index implementing a range-based index.
360+
RangeIndex.stop : Returns the stop value of the RangeIndex.
361+
RangeIndex.start : Returns the start value of the RangeIndex.
362+
354363
Examples
355364
--------
356365
>>> idx = pd.RangeIndex(5)

0 commit comments

Comments
 (0)