cudf.DataFrame.count#

DataFrame.count(axis=0, numeric_only=False)[source]#

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.

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

Pandas Compatibility Note

pandas.DataFrame.count()

Parameters currently not supported are axis and numeric_only.