ValueCounts / Computation Layer

Count occurrences of unique values in a column, returning two new columns: one for unique values and another for their frequencies. Similar to pandas value_counts(), Polars value_counts(), or R's table() function.

Mathematical form: For each unique value in column : When normalized:

Example with raw counts:

valuecount
blue3
red2
green1

Example with normalization:

valueproportion
blue0.50
red0.33
green0.17

Common applications:

  • Frequency analysis
  • Category distribution
  • Data profiling
  • Outlier detection
  • Feature engineering
  • Quality checks
  • Distribution analysis

Note: Null values are excluded from counting by default. The output will be added as two new columns to the dataframe.

Table
0
0
Table

Select

column

The column to analyze. Common input types:

  • Categorical variables (product types, status codes)
  • Discrete numeric values (ratings, counts)
  • Text data (tags, labels)
  • Binary flags (true/false values)

Maximum column name length: 128 characters

Sort

bool
false

Control output ordering. Examples:

With sort=true:

valuecount
blue3
red2
green1

With sort=false (arbitrary order):

valuecount
red2
green1
blue3
false

Control output values. Examples:

With normalize=false (counts):

valuecount
blue3
red2
green1

With normalize=true (proportions):

valueproportion
blue0.50
red0.33
green0.17