cudf.IntervalIndex#

class cudf.IntervalIndex(data, closed=None, dtype=None, copy=False, name=None)#

Immutable index of intervals that are closed on the same side.

Parameters
dataarray-like (1-dimensional)

Array-like containing Interval objects from which to build the IntervalIndex.

closed{“left”, “right”, “both”, “neither”}, default “right”

Whether the intervals are closed on the left-side, right-side, both or neither.

dtypedtype or None, default None

If None, dtype will be inferred.

copybool, default False

Copy the input data.

nameobject, optional

Name to be stored in the index.

Returns
IntervalIndex
__init__(data, closed=None, dtype=None, copy=False, name=None)#

Methods

__init__(data[, closed, dtype, copy, name])

abs()

Return a Series/DataFrame with absolute numeric value of each element.

all([axis, skipna, level])

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 Series values.

astype(dtype[, copy])

Create an Index with values cast to dtypes.

copy([name, deep, dtype, names])

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.

dot(other[, reflect])

Get dot product of frame and other, (binary operator dot).

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, **kwargs)

Determine if two Index objects contain the same elements.

factorize([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(first, last)

Find range that starts with first and ends with last, inclusively.

from_arrow(array)

Create from PyArrow Array/ChunkedArray.

from_breaks([closed, name, copy, dtype])

Construct an IntervalIndex from an array of splits.

from_pandas(index[, nan_as_null])

Convert from a Pandas Index.

get_level_values(level)

Return an Index of values for requested level.

get_loc(key[, method, tolerance])

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

get_slice_bound(label, side[, kind])

Calculate slice bound that corresponds to given label.

head([n])

Return the first n rows.

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.

kurt([axis, skipna, level, numeric_only])

Return Fisher's unbiased kurtosis of a sample.

kurtosis([axis, skipna, level, numeric_only])

Return Fisher's unbiased kurtosis of a sample.

mask(cond[, other, inplace])

Replace values where the condition is True.

max([axis, skipna, level, numeric_only])

Return the maximum of the values in the DataFrame.

mean([axis, skipna, level, numeric_only])

Return the mean of the values for the requested axis.

median([axis, skipna, level, numeric_only])

Return the median of the values for the requested axis.

memory_usage([deep])

Return the memory usage of an object.

min([axis, skipna, level, numeric_only])

Return the minimum of the values in the DataFrame.

nans_to_nulls()

Convert nans (if any) to nulls

notna()

Identify non-missing values.

notnull()

Identify non-missing values.

nunique([dropna])

Return count of unique values for the column.

pipe(func, *args, **kwargs)

Apply func(self, *args, **kwargs).

prod([axis, skipna, dtype, level, ...])

Return product of the values in the DataFrame.

product([axis, skipna, dtype, level, ...])

Return product of the values in the DataFrame.

rename(name[, inplace])

Alter Index name.

repeat(repeats[, axis])

Repeat elements of a Index.

rolling(window[, min_periods, center, axis, ...])

Rolling window calculations.

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

Find indices where elements should be inserted to maintain order

serialize()

Generate an equivalent serializable representation of an object.

set_names(names[, level, inplace])

Set Index or MultiIndex name.

skew([axis, skipna, level, numeric_only])

Return unbiased Fisher-Pearson skew of a sample.

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

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

std([axis, skipna, level, ddof, numeric_only])

Return sample standard deviation of the DataFrame.

sum([axis, skipna, dtype, level, ...])

Return sum of the values in the DataFrame.

sum_of_squares([dtype])

Return the sum of squares of values.

tail([n])

Returns the last n rows as a new DataFrame or Series

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_hdf(path_or_buf, key, *args, **kwargs)

Write the contained data to an HDF5 file using HDFStore.

to_json([path_or_buf])

Convert the cuDF object to a JSON string.

to_list()

to_numpy([dtype, copy, na_value])

Convert the Frame to a NumPy array.

to_pandas([nullable])

Convert to a Pandas Index.

to_series([index, name])

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

to_string()

Convert to string

tolist()

union(other[, sort])

Form the union of two Index objects.

unique()

Return unique values in the index.

var([axis, skipna, level, ddof, numeric_only])

Return unbiased variance of the DataFrame.

where(cond[, other, inplace])

Replace values where the condition is False.

Attributes

dtype

dtype of the underlying values in GenericIndex.

empty

Indicator whether DataFrame or Series is empty.

has_duplicates

hasnans

Return True if there are any NaNs or nulls.

is_monotonic

Return boolean if values in the object are monotonically increasing.

is_monotonic_decreasing

Return boolean if values in the object are monotonically decreasing.

is_monotonic_increasing

Return boolean if values in the object are monotonically increasing.

is_unique

Return boolean if values in the object are unique.

name

Get the name of this object.

names

Returns a tuple containing the name of the Index.

ndim

Number of dimensions of the underlying data, by definition 1.

nlevels

Number of levels.

shape

Get a tuple representing the dimensionality of the Index.

size

Return the number of elements in the underlying data.

values

Return a CuPy representation of the DataFrame.

values_host

Return a NumPy representation of the data.