Shape · Columns
Clip Values
Caps numbers at a lower and/or upper bound. Anything below becomes the minimum, anything above becomes the maximum.
Also known as: Clamp, cap outliers
How it works
Click Add column and enter a min, a max or both for each column; a rule needs at least one bound. Values below the minimum become the minimum and values above the maximum become the maximum, in place; everything in between and every null is left as it is. A rule whose minimum is above its maximum is flagged in the panel and skipped, and a second rule on the same column replaces the first.
Inputs and outputs
Inputs
data— Table
Outputs
data— Table
Settings
The Attributes panel of Clip Values, as in the app: the controls work, but nothing runs — there is no data behind it.
The same settings, as the Assistant writes them
{
clips: [{ column: string, lower?: number, upper?: number }]
}
Example
Order lines sometimes carry a negative discount or one above the 50 percent policy. Add discount_pct with min 0 and max 50, so -5 becomes 0, 72 becomes 50 and 15 stays 15.