You are viewing documentation about an older version (1.20.0). View latest version

Index¶

All supported Index APIs

Constructor

Index([data, dtype, copy, name, ...])

Properties

Index.values

Return an array representing the data in the Index.

Index.is_monotonic_increasing

Return a boolean if the values are equal or increasing.

Index.is_monotonic_decreasing

Return a boolean if the values are equal or decreasing.

Index.is_unique

Index.has_duplicates

Index.hasnans()

Return True if there are any NaNs.

Index.dtype

Index.shape

Get a tuple of the shape of the underlying data.

Index.name

Get the index name.

Index.names

Get names of index

Index.ndim

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

Index.size

Get the number of elements in the underlying data.

Index.empty

Whether the index is empty.

Index.T

Return the transpose, which is by definition self.

Index.nlevels

Snowflake Specific

Index.to_pandas()

Convert Snowpark pandas Index to pandas Index

Modifying and computations

Index.all()

Return whether all elements are Truthy.

Index.any()

Return whether any element is Truthy.

Index.argmin()

Return int position of the smallest value in the Series.

Index.argmax()

Return int position of the largest value in the Series.

Index.copy(**kwargs)

Index.delete()

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

Index.drop(**kwargs)

Index.drop_duplicates()

Return Index with duplicate values removed.

Index.duplicated(**kwargs)

Index.equals(**kwargs)

Index.identical()

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

Index.insert()

Make new Index inserting new item at location.

Index.is_boolean()

Check if the Index only consists of booleans.

Index.is_floating()

Check if the Index is a floating type.

Index.is_integer()

Check if the Index only consists of integers.

Index.is_interval()

Check if the Index holds Interval objects.

Index.is_numeric()

Check if the Index only consists of numeric data.

Index.is_object()

Check if the Index is of the object dtype.

Index.item(**kwargs)

Index.min()

Return the minimum value of the Index.

Index.max()

Return the maximum value of the Index.

Index.reindex()

Create index with target's values.

Index.rename()

Alter Index or MultiIndex name.

Index.unique(**kwargs)

Index.nunique(**kwargs)

Index.value_counts(**kwargs)

Index.array

Index.str

Vectorized string functions for Series and Index.

Compatibility with MultiIndex

Index.set_names(names[, level, inplace])

Set Index name.

Missing values

Index.fillna()

Fill NA/NaN values with the specified value.

Index.dropna()

Return Index without NA/NaN values.

Index.isna()

Detect missing values.

Index.notna()

Detect existing (non-missing) values.

Conversion

Index.astype(**kwargs)

Index.item(**kwargs)

Index.to_list()

Return a list of the values.

Index.tolist()

Return a list of the values.

Index.to_series(**kwargs)

Index.to_frame(**kwargs)

Sorting

Index.sort_values(**kwargs)

Combining / joining / set operations

Index.append()

Append a collection of Index options together.

Index.join()

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

Index.intersection(**kwargs)

Index.union(**kwargs)

Index.difference(**kwargs)

Selecting

Index.get_indexer_for(**kwargs)

Index.get_level_values(**kwargs)

Index.isin()

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

Index.slice_indexer(**kwargs)