๐Ÿพ Xarray is now 10 years old! ๐ŸŽ‰

xarray.CFTimeIndex.any

xarray.CFTimeIndex.any#

CFTimeIndex.any(*args, **kwargs)[source]#

Return whether any element is Truthy.

Parameters:
  • *args โ€“ Required for compatibility with numpy.

  • **kwargs โ€“ Required for compatibility with numpy.

Returns:

bool or array-like (if axis is specified) โ€“ A single element array-like may be converted to bool.

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.

Examples

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