cudf.Index#

class cudf.Index(data, *args, **kwargs)#

An array of orderable values that represent the indices of another Column

Parameters:
dataColumn

The Column of data for this index

namestr optional

The name of the Index. If not provided, the Index adopts the value Column’s name. Otherwise if this name is different from the value Column’s, the data Column will be cloned to adopt this name.

Attributes

_values: A Column object

name: A string

Methods

all([axis, skipna])

Return whether all elements are True in DataFrame.

any()

Return whether any elements is True in DataFrame.

append(other)

Append a collection of Index objects together.

argsort([axis, kind, order, ascending, ...])

Return the integer indices that would sort the index.

astype(dtype[, copy])

Create an Index with values cast to dtypes.

copy([name, deep])

Make a copy of this object.

deserialize(header, frames)

Generate an object from a serialized representation.

device_deserialize(header, frames)

Perform device-side deserialization tasks.

device_serialize()

Serialize data and metadata associated with device memory.

difference(other[, sort])

Return a new Index with elements from the index that are not in other.

drop_duplicates([keep, nulls_are_equal])

Drop duplicate rows in index.

dropna([how])

Drop null rows from Index.

duplicated([keep])

Indicate duplicate index values.

equals(other)

Test whether two objects contain the same elements.

factorize([sort, use_na_sentinel])

Encode the input values as integer labels.

fillna([value, method, axis, inplace, limit])

Fill null values with value or specified method.

find_label_range(loc)

Translate a label-based slice to an index-based slice

from_arrow(obj)

Create from PyArrow Array/ChunkedArray.

from_pandas(index[, nan_as_null])

Convert from a Pandas Index.

get_indexer(target[, method, limit, tolerance])

Compute indexer and mask for new index given the current index.

get_level_values(level)

Return an Index of values for requested level.

get_loc(key)

Get integer location, slice or boolean mask for requested label.

get_slice_bound(label, side)

Calculate slice bound that corresponds to given label.

host_deserialize(header, frames)

Perform device-side deserialization tasks.

host_serialize()

Serialize data and metadata associated with host memory.

intersection(other[, sort])

Form the intersection of two Index objects.

is_boolean()

Check if the Index only consists of booleans.

is_categorical()

Check if the Index holds categorical data.

is_floating()

Check if the Index is a floating type.

is_integer()

Check if the Index only consists of integers.

is_interval()

Check if the Index holds Interval objects.

is_numeric()

Check if the Index only consists of numeric data.

is_object()

Check if the Index is of the object dtype.

isin(values)

Return a boolean array where the index values are in values.

isna()

Identify missing values.

isnull()

Identify missing values.

join(other[, how, level, return_indexers, sort])

Compute join_index and indexers to conform data structures to the new index.

max([axis, skipna, numeric_only])

Return the maximum of the values in the DataFrame.

memory_usage([deep])

Return the memory usage of an object.

min([axis, skipna, numeric_only])

Return the minimum of the values in the DataFrame.

notna()

Identify non-missing values.

notnull()

Identify non-missing values.

nunique([dropna])

Return count of unique values for the column.

rename(name[, inplace])

Alter Index name.

repeat(repeats[, axis])

Repeat elements of a Index.

searchsorted(values[, side, ascending, ...])

Find indices where elements should be inserted to maintain order

set_names(names[, level, inplace])

Set Index or MultiIndex name.

shift([periods, freq])

Not yet implemented

sort_values([return_indexer, ascending, ...])

Return a sorted copy of the index, and optionally return the indices that sorted the index itself.

take(indices[, axis, allow_fill, fill_value])

Return a new index containing the rows specified by indices

to_arrow()

Convert to a PyArrow Array.

to_cupy([dtype, copy, na_value])

Convert the Frame to a CuPy array.

to_dlpack()

Converts a cuDF object into a DLPack tensor.

to_frame([index, name])

Create a DataFrame with a column containing this Index

to_numpy([dtype, copy, na_value])

Convert the Frame to a NumPy array.

to_pandas(*[, nullable, arrow_type])

Convert to a Pandas Index.

to_series([index, name])

Create a Series with both index and values equal to the index keys.

union(other[, sort])

Form the union of two Index objects.

unique()

Return unique values in the index.

where(cond[, other, inplace])

Replace values where the condition is False.

serialize

to_list

tolist