modin.pandas.Index.any

Index.any(*args, **kwargs) bool | ExtensionArray[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/modin/plugin/extensions/index.py#L503-L504)

Return whether any element is Truthy.

Parameters:
  • *args – Required for compatibility with numpy.

  • **kwargs – Required for compatibility with numpy.

Returns:

A single element array-like may be converted to bool.

Return type:

bool or array-like (if axis is specified)

See also

Index.all

Return whether all elements are True.

Series.all

Return whether all elements are True.

Notes

Not a Number (NaN), positive infinity and negative infinity evaluate to True because these are not equal to zero. *args and **kwargs are present for compatibility with numpy and not used with Snowpark pandas.

Examples

>>> index = pd.Index([0, 1, 2])
>>> index.any()
True
Copy
>>> index = pd.Index([0, 0, 0])
>>> index.any()
False
Copy
Language: English