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.

acos()

Get Trigonometric inverse cosine, element-wise.

add(other, axis[, level, fill_value])

Get Addition of dataframe or series and other, element-wise (binary operator add).

all([axis, skipna, level])

Return whether all elements are True in DataFrame.

any([axis, skipna, level])

Return whether any elements is True in DataFrame.

append(other)

Append a collection of Index options together.

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

Return the integer indices that would sort the Series values.

asin()

Get Trigonometric inverse sine, element-wise.

astype(dtype[, copy])

Create an Index with values cast to dtypes.

atan()

Get Trigonometric inverse tangent, element-wise.

ceil()

Rounds each value upward to the smallest integral value not less than the original.

clip([lower, upper, inplace, axis])

Trim values at input threshold(s).

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

Make a copy of this object.

cos()

Get Trigonometric cosine, element-wise.

cummax([axis])

Return cumulative max of the Frame.

cummin([axis])

Return cumulative min of the Frame.

cumprod([axis])

Return cumulative product of the Frame.

cumsum([axis])

Return cumulative sum of the Frame.

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.

div(other, axis[, level, fill_value])

Get Floating division of dataframe or series and other, element-wise (binary operator truediv).

divide(other, axis[, level, fill_value])

Get Floating division of dataframe or series and other, element-wise (binary operator truediv).

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.

eq(other[, axis, level, fill_value])

Equal to, element-wise (binary operator eq).

equals(other, **kwargs)

Determine if two Index objects contain the same elements.

exp()

Get the exponential of all elements, element-wise.

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.

floor()

Rounds each value downward to the largest integral value not greater than the original.

floordiv(other, axis[, level, fill_value])

Get Integer division of dataframe or series and other, element-wise (binary operator floordiv).

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.

ge(other[, axis, level, fill_value])

Greater than or equal, element-wise (binary operator ge).

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.

gt(other[, axis, level, fill_value])

Greater than, element-wise (binary operator gt).

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.

interleave_columns()

Interleave Series columns of a table into a single column.

interpolate([method, axis, limit, inplace, ...])

Interpolate data values between some points.

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.

le(other[, axis, level, fill_value])

Less than or equal, element-wise (binary operator le).

log()

Get the natural logarithm of all elements, element-wise.

lt(other[, axis, level, fill_value])

Less than, element-wise (binary operator lt).

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.

mod(other, axis[, level, fill_value])

Get Modulo division of dataframe or series and other, element-wise (binary operator mod).

mul(other, axis[, level, fill_value])

Get Multiplication of dataframe or series and other, element-wise (binary operator mul).

multiply(other, axis[, level, fill_value])

Get Multiplication of dataframe or series and other, element-wise (binary operator mul).

nans_to_nulls()

Convert nans (if any) to nulls

ne(other[, axis, level, fill_value])

Not equal to, element-wise (binary operator ne).

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).

pow(other, axis[, level, fill_value])

Get Exponential power of dataframe series and other, element-wise (binary operator pow).

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.

radd(other, axis[, level, fill_value])

Get Addition of dataframe or series and other, element-wise (binary operator radd).

rank([axis, method, numeric_only, ...])

Compute numerical data ranks (1 through n) along axis.

rdiv(other, axis[, level, fill_value])

Get Floating division of dataframe or series and other, element-wise (binary operator rtruediv).

rename(name[, inplace])

Alter Index name.

repeat(repeats[, axis])

Repeat elements of a Index.

replace([to_replace, value, inplace, limit, ...])

Replace values given in to_replace with value.

rfloordiv(other, axis[, level, fill_value])

Get Integer division of dataframe or series and other, element-wise (binary operator rfloordiv).

rmod(other, axis[, level, fill_value])

Get Modulo division of dataframe or series and other, element-wise (binary operator rmod).

rmul(other, axis[, level, fill_value])

Get Multiplication of dataframe or series and other, element-wise (binary operator rmul).

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

Rolling window calculations.

rpow(other, axis[, level, fill_value])

Get Exponential power of dataframe or series and other, element-wise (binary operator pow).

rsub(other, axis[, level, fill_value])

Get Subtraction of dataframe or series and other, element-wise (binary operator rsub).

rtruediv(other, axis[, level, fill_value])

Get Floating division of dataframe or series and other, element-wise (binary operator rtruediv).

sample([n, frac, replace, weights, ...])

scale()

Scale values to [0, 1] in float64

scatter_by_map(map_index[, map_size, keep_index])

Scatter to a list of dataframes.

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.

shift([periods, freq, axis, fill_value])

Shift values by periods positions.

sin()

Get Trigonometric sine, element-wise.

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.

sqrt()

Get the non-negative square-root of all elements, element-wise.

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

Return sample standard deviation of the DataFrame.

sub(other, axis[, level, fill_value])

Get Subtraction of dataframe or series and other, element-wise (binary operator sub).

subtract(other, axis[, level, fill_value])

Get Subtraction of dataframe or series and other, element-wise (binary operator sub).

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

tan()

Get Trigonometric tangent, element-wise.

tile(count)

Repeats the rows from self DataFrame count times to form a new DataFrame.

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()

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()

truediv(other, axis[, level, fill_value])

Get Floating division of dataframe or series and other, element-wise (binary operator truediv).

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

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

Get the dimensionality (always 1 for single-columned frames).

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.