value_counts function

table for Arrow objects

table for Arrow objects

This function tabulates the values in the array and returns a table of counts.

value_counts(x)

Arguments

  • x: Array or ChunkedArray

Returns

A StructArray containing "values" (same type as x) and "counts" Int64.

Examples

cyl_vals <- Array$create(mtcars$cyl) counts <- value_counts(cyl_vals)
  • Maintainer: Jonathan Keane
  • License: Apache License (>= 2.0)
  • Last published: 2025-02-26