CSV Data Cleaner avatar

CSV Data Cleaner

Pricing

Pay per usage

Go to Apify Store
CSV Data Cleaner

CSV Data Cleaner

Clean messy CSVs in one run—no silent data loss. Remove duplicate/blank rows, trim whitespace, normalize null/n/a/-/none to empty. Extra cells and duplicate headers stay; STATS.json logs every fix.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Luqin Wang

Luqin Wang

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 months ago

Last modified

Categories

Features

Limited permissions

Share

Upload a messy CSV and get back a clean one — duplicates removed, whitespace trimmed, null-like values (null, n/a, none, -, …) normalized to empty cells, and empty rows dropped. You also get a STATS.json report showing exactly what changed.

Input

FieldDescription
CSV file to cleanUpload a .csv file from your computer
Or: CSV file URLPublic URL of a CSV file
Or: paste CSV textPaste raw CSV content directly
Delimiter, ; tab or `
Remove duplicate rowsOn by default
Trim whitespaceOn by default
Normalize null-like valuesOn by default
Remove empty rowsOn by default

Only one source is needed; priority is uploaded file → URL → pasted text.

Output

  • Dataset: one item per cleaned row, with a stable recordId. Duplicate headers receive deterministic __2, __3, … suffixes and cells beyond the source header use extraColumn_1, extraColumn_2, … so no cell is lost.
  • Key-value store CLEANED: the cleaned CSV file (text/csv)
  • Key-value store STATS: JSON report, e.g.
{
"totalInputRows": 1000,
"chargedInputRows": 1000,
"outputRows": 972,
"duplicatesRemoved": 21,
"nullsNormalized": 45,
"emptyRowsRemoved": 7,
"columns": 8,
"sourceColumnNames": ["id", "name", "email", ...],
"datasetFieldNames": ["id", "name", "email", ...],
"delimiterUsed": ","
}

Runs admit at most 8 MiB of CSV input, 100,000 parsed rows, and 500,000 conservatively estimated CSV cells. Larger inputs fail before parser allocation or cleaning instead of risking unbounded memory use.

Run via API

curl -H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"csvUrl": "https://example.com/messy.csv"}' \
"https://api.apify.com/v2/acts/<username>~csv-data-cleaner/runs?waitForFinish=60"

Local development

mkdir -p storage/key_value_stores/default
cp test/INPUT.json storage/key_value_stores/default/INPUT.json
APIFY_LOCAL_STORAGE_DIR=./storage python3 -m src.main
# results: storage/datasets/default/ + storage/key_value_stores/default/CLEANED + STATS