pyarrow.compute.value_counts¶
- pyarrow.compute.value_counts(array, /, *, memory_pool=None)¶
Compute counts of unique elements.
For each distinct value, compute the number of times it occurs in the array. The result is returned as an array of struct<input type, int64>. Nulls in the input are counted and included in the output as well.
- Parameters:
- arrayArray-like
Argument to compute function.
- memory_pool
pyarrow.MemoryPool
, optional If not passed, will allocate memory from the default memory pool.