pandas.RangeIndex

class pandas.RangeIndex(start=None, stop=None, step=None, dtype=None, copy=False, name=None)[source]

Immutable Index implementing a monotonic integer range.

RangeIndex is a memory-saving special case of Int64Index limited to representing monotonic ranges. Using RangeIndex may in some instances improve computing speed.

This is the default index type used by DataFrame and Series when no explicit index is provided by the user.

Parameters
start:int (default: 0), range, or other RangeIndex instance

If int and “stop” is not given, interpreted as “stop” instead.

stop:int (default: 0)
step:int (default: 1)
dtype:np.int64

Unused, accepted for homogeneity with other index types.

copy:bool, default False

Unused, accepted for homogeneity with other index types.

name:object, optional

Name to be stored in the index.

See also

Index

The base pandas Index type.

Int64Index

Index of int64 data.

Attributes

start

The value of the start parameter (0 if this was not supplied).

stop

The value of the stop parameter.

step

The value of the step parameter (1 if this was not supplied).

Methods

from_range(data[, name, dtype])

Create RangeIndex from a range object.

© 2008–2021, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.3.4/reference/api/pandas.RangeIndex.html