Create intermediate Works with: Any AI

Text Column Cleaning and Standardization

Table output

Normalize names, categories, and free text.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

Rate this prompt

Loading ratings…

Clean a text column so equal things look equal. Column and sample values (include the ugly ones): [SAMPLE_VALUES]. What the values mean and how many distinct values exist: [MEANING_AND_COUNTS]. What I will do with the column: [USE_CASE].

Deliver:
1. A frequency table of the problems you see (case, whitespace, punctuation, accents, abbreviations, typos, synonyms) with a count estimate from my sample.
2. A step-by-step normalization recipe in pandas using the .str methods and a regex or two, each step with a before and after example from my values.
3. A mapping table I can edit: Raw value | Clean value | Rule or reason. Mark entries you are unsure about for human review rather than guessing.
4. A fuzzy-matching suggestion for near-duplicates (for example difflib or rapidfuzz) with a similarity threshold and a plan to review borderline pairs by hand, plus the risk of merging distinct entities such as "Springfield, IL" and "Springfield, MO".
5. Checks: distinct count before and after, the ten most changed values, and a list of values left untouched.
Keep the original column; write the cleaned result to a new column.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

Related prompts