Clean / dedupe preview
clean_previewPreview CSV cleaning—trim whitespace, collapse spaces, drop empty rows, deduplicate, normalize case and numbers—without altering the source. Optionally save cleaned copy to csv-insights-output/.
Instructions
Preview cleaning (trim whitespace, collapse spaces, drop empty rows, dedupe, case normalisation, number normalisation) without touching the source. Set save_as to write the cleaned copy to csv-insights-output/ (never overwrites).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| case | No | ||
| file | Yes | CSV path relative to the allowed directory (CSV_INSIGHTS_DIR), e.g. 'sales/2026-q3.csv' | |
| dedupe | No | Remove exact duplicate rows (case-insensitive) | |
| save_as | No | Output file name (written as csv-insights-output/<name>.csv) | |
| dedupe_on | No | Treat rows as duplicates when these columns match | |
| collapse_spaces | No | ||
| drop_empty_rows | No | Default true | |
| trim_whitespace | No | Default true | |
| normalize_numbers | No | Columns where '$1,200.00' becomes '1200' |