pandas.RangeIndex.from_range#
- classmethod RangeIndex.from_range(data, name=None, dtype=None)[source]#
Create
pandas.RangeIndex
from arange
object.- Returns:
- RangeIndex
Examples
>>> pd.RangeIndex.from_range(range(5)) RangeIndex(start=0, stop=5, step=1)
>>> pd.RangeIndex.from_range(range(2, -10, -3)) RangeIndex(start=2, stop=-10, step=-3)