databricks.koalas.Series.count

Series.count()[source]

Return number of non-NA/null observations in the Series.

Returns
nobsint

Examples

Constructing DataFrame from a dictionary:

>>> df = ks.DataFrame({"Person":
...                    ["John", "Myla", "Lewis", "John", "Myla"],
...                    "Age": [24., np.nan, 21., 33, 26]})

Notice the uncounted NA values:

>>> df['Person'].count()
5
>>> df['Age'].count()
4