Index.all(self, *args, **kwargs)
[source]
Return whether all elements are True.
Parameters: |
|
---|---|
Returns: |
|
See also
Index.any
Series.any
Series.all
Not a Number (NaN), positive infinity and negative infinity evaluate to True because these are not equal to zero.
all
True, because nonzero integers are considered True.
>>> pd.Index([1, 2, 3]).all() True
False, because 0
is considered False.
>>> pd.Index([0, 1, 2]).all() False
any
True, because 1
is considered True.
>>> pd.Index([0, 0, 1]).any() True
False, because 0
is considered False.
>>> pd.Index([0, 0, 0]).any() False
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.Index.all.html