pandera.typing.pyspark.Index

class pandera.typing.pyspark.Index(data: Any | None = None, dtype: str | dtype | ExtensionDtype | None = None, copy: bool = False, name: Any | Tuple[Any, ...] | None = None, tupleize_cols: bool = True, **kwargs: Any)[source]

Representation of pandas.Index, only used for type annotation.

new in 0.8.0

Attributes

T

Return the transpose, For index, It will be index itself.

asi8

Integer representation of the values.

default_dtype

dtype

Return the dtype object of the underlying data.

empty

Returns true if the current object is empty.

has_duplicates

If index has duplicates, return True, otherwise False.

hasnans

Return True if it has any missing values.

inferred_type

Return a string of the type inferred from the values.

is_all_dates

Return if all data types of the index are datetime.

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 if the index has unique values.

name

Return name of the Index.

names

Return names of the Index.

ndim

Return an int representing the number of array dimensions.

nlevels

Number of levels in Index & MultiIndex.

shape

Return a tuple of the shape of the underlying data.

size

Return an int representing the number of elements in this object.

values

Return an array representing the data in the Index.

Methods