Ciaren

Remove outliers

Remove outliers — removeOutliers

Drop or clip outliers in numeric columns.

Use cases

  • Strip data-entry spikes before averaging.
  • Winsorize (clip) extreme values to a sane range instead of deleting rows.

What it does

Computes per-column bounds (IQR, z-score, or percentile), then either drops rows that fall outside the bounds or clips their values to the boundary.

Before
nameage
Alice28
Bob250
Carol35
Dave-5
Eve42
5 rows · 2 cols
Remove outliers (columns=[age], method=iqr, action=drop, factor=1.5)
After
nameage
Alice28
Carol35
Eve42
3 rows · 2 cols

Configuration

Config keyTypeRequiredDescription
columnsstring[]YesNumeric columns to scan
methodstringNoiqr (default), zscore, or percentile
actionstringNodrop (default) or clip to the bounds
factorfloatNoIQR multiplier (default 1.5)
thresholdfloatNoz-score threshold (default 3.0)
lower / upperfloatNoPercentile bounds (default 1.0 / 99.0)

Each method has its own parameter: iqr uses factor, zscore uses threshold, percentile uses lower/upper (0–100).

Generated Python code

# method: iqr, action: drop
_s = df_1['amount']
_q1, _q3 = _s.quantile(0.25), _s.quantile(0.75)
_iqr = _q3 - _q1
_lo, _hi = _q1 - 1.5 * _iqr, _q3 + 1.5 * _iqr
df_2 = df_1[_s.between(_lo, _hi) | _s.isna()]

Tips & common mistakes

  • drop removes rows; clip keeps them and pulls outliers to the bound — choose based on whether row counts must stay stable.
  • Match the parameter to the method. Setting threshold while using iqr has no effect.
  • Inspect the effect with a histogram on the node's output.

See also