pandas.RangeIndex.step#
- property RangeIndex.step[source]#
The value of the step parameter (
1if this was not supplied).The
stepparameter determines the increment (or decrement in the case of negative values) between consecutive elements in theRangeIndex.See also
RangeIndexImmutable index implementing a range-based index.
RangeIndex.stopReturns the stop value of the RangeIndex.
RangeIndex.startReturns the start value of the RangeIndex.
Examples
>>> idx = pd.RangeIndex(5) >>> idx.step 1
>>> idx = pd.RangeIndex(2, -10, -3) >>> idx.step -3
Even if
pandas.RangeIndexis empty,stepis still1if not supplied.>>> idx = pd.RangeIndex(1, 0) >>> idx.step 1