pandas.RangeIndex

class pandas.RangeIndex[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), or other RangeIndex instance.

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

stop : int (default: 0)

step : int (default: 1)

name : object, optional

Name to be stored in the index

copy : bool, default False

Unused, accepted for homogeneity with other index types.

See also

Index
The base pandas Index type
Int64Index
Index of int64 data

Attributes

T return the transpose, which is by definition self
asi8
base return the base object if the memory of the underlying data is
data return the data pointer of the underlying data
dtype
dtype_str
empty
flags
has_duplicates
hasnans
inferred_type Always ‘integer’ for Int64Index
is_all_dates Checks that all the labels are datetime objects
is_monotonic alias for is_monotonic_increasing (deprecated)
is_monotonic_decreasing
is_monotonic_increasing
is_unique return if the index has unique values
itemsize return the size of the dtype of the item of the underlying data
name
names
nbytes
ndim return the number of dimensions of the underlying data,
nlevels
shape return a tuple of the shape of the underlying data
size
strides return the strides of the underlying data
values return the underlying data as an ndarray

Methods

from_range(data[, name, dtype]) create RangeIndex from a range (py3), or xrange (py2) object
Scroll To Top