detect_outliers
Detect outliers in a numeric column using IQR or z-score methods, returning counts, percentages, and boundary values. Use before clipping to determine if outliers are errors or genuine.
Instructions
Detect outliers in a numeric column. Methods: 'iqr' (threshold=IQR multiplier) or 'zscore' (threshold=z-score cutoff). Returns count, %, and boundary values. Run BEFORE clip_outliers to quantify outliers and determine if they are errors or genuine. Do not automatically clip without this check. Example: detect_outliers(column="Revenue", method="iqr", threshold=1.5)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| column | Yes | ||
| method | No | iqr | |
| df_name | No | ||
| threshold | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |