Shape · Statistics
Value Counts
Counts how often each value, or combination of values, appears: one row per distinct value with its count or share.
Also known as: Frequency table, tally
How it works
Pick one or more Columns; with several, each distinct combination is one row. Show proportions writes each row's share of the total instead of the count. Sort by frequency is on by default; off, rows come in alphabetical order of the values. Drop nulls is on by default and leaves out a row when any chosen column is NULL. The tally column is named count, or proportion when showing proportions, unless you set Count column name. No columns means nothing is counted.
Inputs and outputs
Inputs
data— Table
Outputs
data— Table
Settings
The Attributes panel of Value Counts, as in the app: the controls work, but nothing runs — there is no data behind it.
The same settings, as the Assistant writes them
{
columns: string[]
normalize: boolean
sort: boolean
dropna: boolean
countColumnName: string
}
Example
Orders per status: columns status, sort by frequency on.
| status | count |
|---|---|
| shipped | 1,204 |
| pending | 87 |
| cancelled | 19 |