pyarrow.compute.count_distinct¶
- pyarrow.compute.count_distinct(array, /, mode='only_valid', *, options=None, memory_pool=None)¶
Count the number of unique values.
By default, only non-null values are counted. This can be changed through CountOptions.
- Parameters:
- arrayArray-like
Argument to compute function.
- mode
str
, default “only_valid” Which values to count in the input. Accepted values are “only_valid”, “only_null”, “all”.
- options
pyarrow.compute.CountOptions
, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool
, optional If not passed, will allocate memory from the default memory pool.