modin.pandas.Index

class modin.pandas.Index(data: ArrayLike | native_pd.Index | Series | None = None, dtype: str | np.dtype | ExtensionDtype | None = None, copy: bool = False, name: object = None, tupleize_cols: bool = True, query_compiler: SnowflakeQueryCompiler = None)[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/modin/plugin/extensions/index.py#L110-L1018)

Bases: object

Methods

all(*args, **kwargs)

Return whether all elements are Truthy.

any(*args, **kwargs)

Return whether any element is Truthy.

append()

Append a collection of Index options together.

argmax([axis, skipna])

Return int position of the largest value in the Series.

argmin([axis, skipna])

Return int position of the smallest value in the Series.

astype(dtype[, copy])

Create an Index with values cast to dtypes.

copy([name, deep])

Make a copy of this object.

delete()

Make new Index with passed location(-s) deleted.

difference(other[, sort])

Return a new Index with elements of index not in other.

drop(labels[, errors])

Make new Index with the passed list of labels deleted.

drop_duplicates()

Return Index with duplicate values removed.

dropna()

Return Index without NA/NaN values.

duplicated([keep])

Indicate duplicate index values.

equals(other)

Determine if two Index objects are equal.

fillna()

Fill NA/NaN values with the specified value.

get_indexer_for(target)

Guaranteed return of an indexer even when non-unique.

get_level_values(level)

Return an Index of values for requested level.

hasnans()

Return True if there are any NaNs.

identical(other)

Similar to equals, but checks that object attributes and types are also equal.

insert()

Make new Index inserting new item at location.

intersection(other[, sort])

Form the intersection of two Index objects.

is_boolean()

Check if the Index only consists of booleans.

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

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

isna()

Detect missing values.

item()

Return the first element of the underlying data as a Python scalar.

join()

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

max([axis, skipna])

Return the maximum value of the Index.

min([axis, skipna])

Return the minimum value of the Index.

notna()

Detect existing (non-missing) values.

nunique([dropna])

Return number of unique elements in the object.

reindex(target[, method, level, limit, ...])

Create index with target's values.

rename(name[, inplace])

Alter Index or MultiIndex name.

set_names(names[, level, inplace])

Set Index name.

slice_indexer([start, end, step])

Compute the slice indexer for input labels and step.

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

Return a sorted copy of the index.

to_frame([index, name])

Create a DataFrame with a column containing the Index.

to_list()

Return a list of the values.

to_numpy([dtype, copy, na_value])

A NumPy ndarray representing the values in this Series or Index.

to_pandas(*[, statement_params])

Convert Snowpark pandas Index to pandas Index.

to_series([index, name])

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

tolist()

Return a list of the values.

union(other[, sort])

Form the union of two Index objects.

unique([level])

Return unique values in the index.

value_counts([normalize, sort, ascending, ...])

Return a Series containing counts of unique values.

Attributes

T

Return the transpose, which is by definition self.

array

return the array of values

dtype

Get the dtype object of the underlying data.

empty

Whether the index is empty.

has_duplicates

Check if the Index has duplicate values.

is_monotonic_decreasing

Return a boolean if the values are equal or decreasing.

is_monotonic_increasing

Return a boolean if the values are equal or increasing.

is_unique

Return if the index has unique values.

name

Get the index name.

names

Get names of index

ndim

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

nlevels

Number of levels.

shape

Get a tuple of the shape of the underlying data.

size

Get the number of elements in the underlying data.

str

Vectorized string functions for Series and Index.

values

Return an array representing the data in the Index.

Language: English