Index.
any
Return whether any element is Truthy.
These parameters will be passed to numpy.any.
A single element array_like may be converted to bool.
See also
Index.all
Return whether all elements are True.
Series.all
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