xorbits.pandas.Index.all#

Index.all()#

Return whether all elements are Truthy.

参数
  • *args – Required for compatibility with numpy.

  • **kwargs – Required for compatibility with numpy.

返回

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

返回类型

bool or array-like (if axis is specified)

参见

Index.any

Return whether any element in an Index is True.

Series.any

Return whether any element in a Series is True.

Series.all

Return whether all elements in a Series are True.

提示

Not a Number (NaN), positive infinity and negative infinity evaluate to True because these are not equal to zero.

实际案例

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

This docstring was copied from pandas.core.indexes.base.Index.