cudf.RangeIndex#

class cudf.RangeIndex(start, stop=None, step=1, dtype=None, copy=False, name=None)#

Immutable Index implementing a monotonic integer range.

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

Parameters:
startint (default: 0), or other range instance
stopint (default: 0)
stepint (default: 1)
nameobject, optional

Name to be stored in the index.

dtypenumpy dtype

Unused, accepted for homogeneity with other index types.

copybool, default False

Unused, accepted for homogeneity with other index types.

Examples

>>> import cudf
>>> cudf.RangeIndex(0, 10, 1, name="a")
RangeIndex(start=0, stop=10, step=1, name='a')
>>> cudf.RangeIndex(range(1, 10, 1), name="a")
RangeIndex(start=1, stop=10, step=1, name='a')

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.

Methods

to_numpy()

Convert to a numpy array.

to_arrow()

Convert to a suitable Arrow object.