# dask.dataframe.DataFrame.mean

#### DataFrame.mean(axis=0, skipna=True, numeric_only=False, split_every=False, \*\*kwargs)

Return the mean of the values over the requested axis.

This docstring was copied from pandas.DataFrame.mean.

Some inconsistencies with the Dask version may exist.

This computes the arithmetic mean of the values in each column
(or row when `axis=1`), skipping missing values by default.

* **Parameters:**
  **axis**
  : Axis for the function to be applied on.
    For Series this parameter is unused and defaults to 0.
    <br/>
    For DataFrames, specifying `axis=None` will apply the aggregation
    across both axes.
    <br/>
    #### Versionadded
    Added in version 2.0.0.

  **skipna**
  : Exclude NA/null values when computing the result.

  **numeric_only**
  : Include only float, int, boolean columns.

  **\*\*kwargs**
  : Additional keyword arguments 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
  : Value containing the calculation referenced in the description.

#### SEE ALSO
[`Series.sum`](dask.dataframe.Series.sum.html.md#dask.dataframe.Series.sum)
: Return the sum.

[`Series.min`](dask.dataframe.Series.min.html.md#dask.dataframe.Series.min)
: Return the minimum.

[`Series.max`](dask.dataframe.Series.max.html.md#dask.dataframe.Series.max)
: Return the maximum.

[`Series.idxmin`](dask.dataframe.Series.idxmin.html.md#dask.dataframe.Series.idxmin)
: Return the index of the minimum.

[`Series.idxmax`](dask.dataframe.Series.idxmax.html.md#dask.dataframe.Series.idxmax)
: Return the index of the maximum.

[`DataFrame.sum`](dask.dataframe.DataFrame.sum.html.md#dask.dataframe.DataFrame.sum)
: Return the sum over the requested axis.

[`DataFrame.min`](dask.dataframe.DataFrame.min.html.md#dask.dataframe.DataFrame.min)
: Return the minimum over the requested axis.

[`DataFrame.max`](dask.dataframe.DataFrame.max.html.md#dask.dataframe.DataFrame.max)
: Return the maximum over the requested axis.

[`DataFrame.idxmin`](dask.dataframe.DataFrame.idxmin.html.md#dask.dataframe.DataFrame.idxmin)
: Return the index of the minimum over the requested axis.

[`DataFrame.idxmax`](dask.dataframe.DataFrame.idxmax.html.md#dask.dataframe.DataFrame.idxmax)
: Return the index of the maximum over the requested axis.

### Examples

```pycon
>>> s = pd.Series([1, 2, 3])
>>> s.mean()
2.0
```

With a DataFrame

```pycon
>>> df = pd.DataFrame({"a": [1, 2], "b": [2, 3]}, index=["tiger", "zebra"])
>>> df
       a   b
tiger  1   2
zebra  2   3
>>> df.mean()
a   1.5
b   2.5
dtype: float64
```

Using axis=1

```pycon
>>> df.mean(axis=1)
tiger   1.5
zebra   2.5
dtype: float64
```

In this case, numeric_only should be set to True to avoid
getting an error.

```pycon
>>> df = pd.DataFrame({"a": [1, 2], "b": ["T", "Z"]}, index=["tiger", "zebra"])
>>> df.mean(numeric_only=True)
a   1.5
dtype: float64
```

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