Docs
Browse Docs
Field guide · Categories and codes

Free text in a coded field

A column meant to hold one of a few fixed values also holds comments, explanations, and whole sentences.

What it looks like

Before
prioritypriority_note
High·
high, call first·
Medium (per Dana)·
see email·
After
prioritypriority_note
High·
Highcall first
Mediumper Dana
needs a decisionsee email
The extra words move to a note column. The last row never stated a priority, so none is invented.

How it happens

  • The field accepted any text, and people used it to explain the value as well as record it.
  • There was no notes column, so the nearest field became one.
  • None of the allowed values fit the case, so someone described it instead.

What it breaks

  • Each annotated value counts as its own category, so group totals fragment.
  • Filters on the fixed values miss every row that carries a comment.
  • The comments, which often matter, are invisible to anyone looking only at the standard values.

How to spot it

  • Count distinct values and compare with the number of allowed ones.
  • Sort by length. Annotated cells are far longer than a bare code.
  • Look for punctuation that a code would not have: commas, parentheses, and question marks.

How to fix it

  • Separate the code from the comment: keep the allowed value in the column and move the rest to a note column.
  • Where the cell names no allowed value at all, leave the code for a person to decide. The comment alone is not an answer.
  • If the same comment keeps recurring, it may be a missing category. Adding it to the list is a decision for whoever owns the list.

TermsFree text, Controlled vocabulary, Categorical data, Validation

Karg checks for many of these when it profiles a file, applies the fixes it is confident about, and sets the rest aside for your review. See how it works, or have our team clean your data for you.