ScrapeStack

All guides

PRACTICAL WORKFLOWS

How to deduplicate CSV records without merging the wrong rows

Choose an identity key, handle conflicting values and keep an audit of removed rows.

By the ScrapeStack editorial team · Reviewed October 20, 2026

Decide what one row represents

A row might represent a company, location, product or observation. Two rows describing the same company at different times may both be necessary. Define that unit before removing duplicates.

Choose the matching rule

Exact-row matching identifies rows where every field matches. Identifier matching uses a chosen key such as a source record ID. Similar-name matching suggests possible matches for review but does not establish identity on its own.

record_id,company,city
A101,Example Studio,Lahore
A102,Example Studio,Karachi

These records share a name but have different identifiers and locations. Removing one solely because the name matches could lose a branch or a separate business.

Normalize only what you understand

Trimming surrounding spaces may remove an accidental difference. Lowercasing a display name can help comparisons, but keep the original spelling. Do not remove URL paths or strip phone prefixes unless your identity rule explains why those differences are irrelevant.

Handle conflicts deliberately

When the same identifier has different values, choose a documented rule. You might keep the most recently verified value if reliable timestamps exist. If freshness is unknown, put the pair in a review file. Do not silently choose whichever row happened to appear first.

Keep a reconciliation note

Original rows:
Exact duplicates removed:
Identifier conflicts awaiting review:
Final retained rows:
Matching rule:
Source file and cleanup date:

Use the browser CSV cleaner for exact duplicate rows. Identity conflicts need a separate decision. Review the import checklist before handing the final file to another system.