Pandas DataFrame.count() function is used to count the number of non-NA/null values across the given axis. The great thing about it is that it works with non-floating type data as well. The df.count() function is defined under the Pandas library.  Pandas is one of the packages in Python, which makes analyzing data much easier for the users.

Understanding Pandas DataFrame count()

Pandas DataFrame.count() function is used to count the number of non-NA/null observations across the given axis. DataFrame.count() works with non-floating type data as well. The count() function is used to count the non-NA cells for each column or row. The values  None,  NaN, NaT, and optionally numpy.inf (depending on pandas.options.mode.use_inf_as_na) are considered NA.

Syntax

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

All the parameters are set to default values.

#pandas #python

Pandas DataFrame count() Method in Python
2.10 GEEK