P27Data CleaningBeginnerImplement10 min

Standardize Inconsistent Category Labels

Clean inconsistent product-category labels without hiding genuinely unknown values.

#categories#normalization#data-quality

Scenario

A supplier file uses 'Home Office', 'home-office', 'HOME OFFICE ', and an occasional 'HomeOffce'.

Problem statement

Create a safe standardization approach and decide what to do with likely typos.

Your Task

  1. Normalize casing and punctuation.
  2. Map approved variants to canonical labels.
  3. Flag unmatched labels for review instead of silently guessing.

Input

categories = ['Home Office', 'home-office', 'HOME OFFICE ', 'HomeOffce']

Related Concepts

Controlled vocabulariesData validationAuditability

Ready to count this problem?

Mark it complete when you have reasoned through the solution in your own words.