pyarrow.compute.count#

pyarrow.compute.count(array, /, mode='only_valid', *, options=None, memory_pool=None)#

Count the number of null / non-null values.

By default, only non-null values are counted. This can be changed through CountOptions.

Parameters:
arrayArray-like

Argument to compute function.

modestr, default “only_valid”

Which values to count in the input. Accepted values are “only_valid”, “only_null”, “all”.

optionspyarrow.compute.CountOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

If not passed, will allocate memory from the default memory pool.