pandas.RangeIndex.step
- propertyRangeIndex.step[source]
-
The value of the step parameter (
1
if this was not supplied).Examples
>>> idx = pd.RangeIndex(5) >>> idx.step 1
>>> idx = pd.RangeIndex(2, -10, -3) >>> idx.step -3
Even if
pandas.RangeIndex
is empty,step
is still1
if not supplied.>>> idx = pd.RangeIndex(1, 0) >>> idx.step 1
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.RangeIndex.step.html