bigframes.pandas.DataFrame.count#
- DataFrame.count(*, numeric_only: bool = False) Series[source]#
Count non-NA cells for each column.
The values None, NaN, NaT, and optionally numpy.inf (depending on pandas.options.mode.use_inf_as_na) are considered NA.
Examples:
>>> df = bpd.DataFrame({"A": [1, None, 3, 4, 5], ... "B": [1, 2, 3, 4, 5], ... "C": [None, 3.5, None, 4.5, 5.0]}) >>> df A B C 0 1.0 1 <NA> 1 <NA> 2 3.5 2 3.0 3 <NA> 3 4.0 4 4.5 4 5.0 5 5.0 [5 rows x 3 columns]
Counting non-NA values for each column:
>>> df.count() A 4 B 5 C 3 dtype: Int64
- Parameters:
numeric_only (bool, default False) – Include only float, int or boolean data.
- Returns:
- For each column/row the number of
non-NA/null entries. If level is specified returns a DataFrame.
- Return type: