cudf.Index#
- class cudf.Index(*args, **kwargs)[source]#
Immutable sequence used for indexing and alignment.
The basic object storing axis labels for all pandas objects.
- Parameters:
- dataarray-like (1-dimensional)
- dtypestr, numpy.dtype, or ExtensionDtype, optional
Data type for the output Index. If not specified, this will be inferred from data.
- copybool, default False
Copy input data.
- nameobject
Name to be stored in the index.
- tupleize_colsbool (default: True)
When True, attempt to create a MultiIndex if possible. Currently not supported.
Attributes
Return the transpose, which is by definition self.
Indicator whether DataFrame or Series is empty.
Get the name of this object.
Returns a FrozenList containing the name of the Index.
Number of dimensions of the underlying data, by definition 1.
Number of levels.
Get a tuple representing the dimensionality of the Index.
Return the number of elements in the underlying data.
Vectorized string functions for Series and Index.
Return a CuPy representation of the DataFrame.
dtype
has_duplicates
hasnans
inferred_type
Return a string of the type inferred from the values. Examples ——– >>> import cudf >>> idx = cudf.Index([1, 2, 3]) >>> idx Index([1, 2, 3], dtype=’int64’) >>> idx.inferred_type ‘integer’
is_monotonic_decreasing
is_monotonic_increasing
is_unique
Methods
all([axis, skipna])Return whether all elements are True in DataFrame.
any()Return whether any elements is True in DataFrame.
argsort([axis, kind, order, ascending, ...])Return the integer indices that would sort the index.
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.
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.
find_label_range(loc)Translate a label-based slice to an index-based slice
from_arrow(obj)Create from PyArrow Array/ChunkedArray.
from_pylibcudf(col[, metadata])Create a Index from a pylibcudf.Column.
get_level_values(level)Return an Index of values for requested level.
get_slice_bound(label, side)Calculate slice bound that corresponds to given label.
host_deserialize(header, frames)Perform device-side deserialization tasks.
Serialize data and metadata associated with host memory.
intersection(other[, sort])Form the intersection of two Index objects.
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.
searchsorted(values[, side, sorter, ...])Find indices where elements should be inserted to maintain order
Generate an equivalent serializable representation of an object.
set_names(names[, level, inplace])Set Index or MultiIndex name.
shift([periods, freq])Shift index by desired number of time frequency increments.
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 SingleColumnFrame (e.g., Series) to a CuPy array.
Converts a cuDF object to a DLPack tensor.
to_frame([index, name])Create a DataFrame with a column containing this Index
to_list()Conversion to host memory lists is currently unsupported
to_numpy([dtype, copy, na_value])Convert the Frame to a NumPy array.
Convert this Index to a pylibcudf.Column.
to_series([index, name])Create a Series with both index and values equal to the index keys.
tolist()Conversion to host memory lists is currently unsupported
Return the transpose, which is by definition self.
union(other[, sort])Form the union of two Index objects.
where(cond[, other, inplace])Replace values where the condition is False.
append
astype
fillna
get_indexer
get_loc
isin
nans_to_nulls
repeat
to_pandas
unique