cudf.DataFrame.count#

DataFrame.count(axis=0, level=None, numeric_only=False, **kwargs)#

Count non-NA cells for each column or row.

The values None, NaN, NaT are considered NA.

Returns
Series

For each column/row the number of non-NA/null entries.

Notes

Parameters currently not supported are axis, level, numeric_only.

Examples

>>> import cudf
>>> import numpy as np
>>> df = cudf.DataFrame({"Person":
...        ["John", "Myla", "Lewis", "John", "Myla"],
...        "Age": [24., np.nan, 21., 33, 26],
...        "Single": [False, True, True, True, False]})
>>> df.count()
Person    5
Age       4
Single    5
dtype: int64