# dask.dataframe.DataFrame.count

#### DataFrame.count(axis=0, numeric_only=False, split_every=False)

Count non-NA cells for each column or row.

This docstring was copied from pandas.DataFrame.count.

Some inconsistencies with the Dask version may exist.

The values None, NaN, NaT, `pandas.NA` are considered NA.

* **Parameters:**
  **axis**
  : If 0 or ‘index’ counts are generated for each column.
    If 1 or ‘columns’ counts are generated for each row.

  **numeric_only**
  : Include only float, int or boolean data.
* **Returns:**
  Series
  : For each column/row the number of non-NA/null entries.

#### SEE ALSO
[`Series.count`](dask.dataframe.Series.count.html.md#dask.dataframe.Series.count)
: Number of non-NA elements in a Series.

`DataFrame.value_counts`
: Count unique combinations of columns.

[`DataFrame.shape`](dask.dataframe.DataFrame.shape.html.md#dask.dataframe.DataFrame.shape)
: Number of DataFrame rows and columns (including NA elements).

[`DataFrame.isna`](dask.dataframe.DataFrame.isna.html.md#dask.dataframe.DataFrame.isna)
: Boolean same-sized DataFrame showing places of NA elements.

### Examples

Constructing DataFrame from a dictionary:

```pycon
>>> df = pd.DataFrame(
...     {
...         "Person": ["John", "Myla", "Lewis", "John", "Myla"],
...         "Age": [24.0, np.nan, 21.0, 33, 26],
...         "Single": [False, True, True, True, False],
...     }
... )
>>> df
   Person   Age  Single
0    John  24.0   False
1    Myla   NaN    True
2   Lewis  21.0    True
3    John  33.0    True
4    Myla  26.0   False
```

Notice the uncounted NA values:

```pycon
>>> df.count()
Person    5
Age       4
Single    5
dtype: int64
```

Counts for each **row**:

```pycon
>>> df.count(axis="columns")
0    3
1    2
2    3
3    3
4    3
dtype: int64
```

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