Skip to main content
`Ctrl`+`K`

# pandas.RangeIndex.from_range

classmethod RangeIndex.from_range(data, name=None, dtype=None)

  Create `pandas.RangeIndex` from a `range` 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)