# dask.dataframe.Index.any

#### Index.any(axis=0, skipna=True, split_every=False, \*\*kwargs)

Return whether any element is True, potentially over an axis.

This docstring was copied from pandas.DataFrame.any.

Some inconsistencies with the Dask version may exist.

Returns False unless there is at least one element within a series or
along a Dataframe axis that is True or equivalent (e.g. non-zero or
non-empty).

* **Parameters:**
  **axis**
  : Indicate which axis or axes should be reduced. For Series this parameter
    is unused and defaults to 0.
    * 0 / ‘index’ : reduce the index, return a Series whose index is the
      original column labels.
    * 1 / ‘columns’ : reduce the columns, return a Series whose index is the
      original index.
    * None : reduce all axes, return a scalar.

  **bool_only**
  : Include only boolean columns. Not implemented for Series.

  **skipna**
  : Exclude NA/null values. If the entire row/column is NA and skipna is
    True, then the result will be False, as for an empty row/column.
    If skipna is False, NA values are treated as True for NumPy-backed
    dtypes (since they are not equal to zero). For nullable dtypes such
    as `boolean`, NA values propagate following
    [Kleene logic](https://pandas.pydata.org/pandas-docs/stable/user_guide/boolean.html#boolean-kleene).

  **\*\*kwargs**
  : Additional keywords have no effect but might be accepted for
    compatibility with NumPy. See [NumPy compatibility kwargs](https://pandas.pydata.org/pandas-docs/stable/user_guide/gotchas.html#gotchas-numpy-kwargs) for more.
* **Returns:**
  Series or scalar
  : If axis=None, then a scalar boolean is returned.
    Otherwise a Series is returned with index matching the index argument.

#### SEE ALSO
[`numpy.any`](https://numpy.org/doc/stable/reference/generated/numpy.any.html#numpy.any)
: Numpy version of this method.

[`Series.any`](dask.dataframe.Series.any.html.md#dask.dataframe.Series.any)
: Return whether any element is True.

[`Series.all`](dask.dataframe.Series.all.html.md#dask.dataframe.Series.all)
: Return whether all elements are True.

[`DataFrame.any`](dask.dataframe.DataFrame.any.html.md#dask.dataframe.DataFrame.any)
: Return whether any element is True over requested axis.

[`DataFrame.all`](dask.dataframe.DataFrame.all.html.md#dask.dataframe.DataFrame.all)
: Return whether all elements are True over requested axis.

### Examples

**Series**

For Series input, the output is a scalar indicating whether any element
is True.

```pycon
>>> pd.Series([False, False]).any()
False
>>> pd.Series([True, False]).any()
True
>>> pd.Series([], dtype="float64").any()
False
>>> pd.Series([np.nan]).any()
False
>>> pd.Series([np.nan]).any(skipna=False)
True
```

**DataFrame**

Whether each column contains at least one True element (the default).

```pycon
>>> df = pd.DataFrame({"A": [1, 2], "B": [0, 2], "C": [0, 0]})
>>> df
   A  B  C
0  1  0  0
1  2  2  0
```

```pycon
>>> df.any()
A     True
B     True
C    False
dtype: bool
```

Aggregating over the columns.

```pycon
>>> df = pd.DataFrame({"A": [True, False], "B": [1, 2]})
>>> df
       A  B
0   True  1
1  False  2
```

```pycon
>>> df.any(axis="columns")
0    True
1    True
dtype: bool
```

```pycon
>>> df = pd.DataFrame({"A": [True, False], "B": [1, 0]})
>>> df
       A  B
0   True  1
1  False  0
```

```pycon
>>> df.any(axis="columns")
0    True
1    False
dtype: bool
```

Aggregating over the entire DataFrame with `axis=None`.

```pycon
>>> df.any(axis=None)
True
```

any for an empty DataFrame is an empty Series.

```pycon
>>> pd.DataFrame([]).any()
Series([], dtype: bool)
```

<!-- !! processed by numpydoc !! -->
