Skip to content

Recipes: cleaning you can replay

Turn suggested fixes into an ordered recipe, check each step's changes, and apply it as a new dataset version.

Introductory ~10 min7 steps

You will be able to

  • Build a recipe from suggested fixes and your own steps
  • Read a step's Changes view before trusting it
  • Explain why step order matters and why the source is never changed

Read first

01

Why not edit the data?

Read

Spreadsheet fixes vanish: six months later nobody knows which rows changed or why. A recipeRecipeAn ordered list of data-preparation steps that replays on new versions and exports to SQL, pandas and dplyr. is an ordered list of steps that transforms a source dataset into a clean one. You can read it, reorder it, undo any step and rerun it on next month's file.

Applying a recipe writes a new dataset version. The source is never changed.

Messy customer list
02

Let the profile start you off

In the app

Add the customer list, open Prepare (⌘3), and use New recipe.

Open Suggested fixes in the recipe's toolbar. Each suggestion names a problem the profiler found and offers a step, with Why it matters underneath. Add the ones you agree with, then use Add step for anything of your own.

03

Order matters

Predict

Predict first

age holds text such as -99, 25 and n/a. You want ages from 0 to 120. Which step has to come first: Parse numbers or Valid range rule?

It works the same either wayParse numbers firstValid range rule first
Reveal

The answer: Parse numbers first

Parse numbers. A range rule needs numbers to compare. Each step sees only the output of the steps before it, so the recipe reads as a story from raw to clean.

04

Check what each step did

Explore

Select a step and look at its changes: a table of row, column, before and after. It's the fastest way to catch a rule that matched more than you meant.

Column lineage shows where each output column came from. History keeps versions of the recipe, so you can compare and restore.

05

Learned values

Read

Some steps learn from the data: Fill missing values learns a median, Cap outliers learns bounds. A recipe stores what it learned, so reruns are stable.

When the source changes, Refit learned values recomputes them. Applying also learns them again where the data changed, and the dialog tells you so before you commit.

06

Check your understanding

Checkpoint

Check yourself

Put these steps for a messy age column in a sensible order.

  1. 1Valid range rule
  2. 2Flag missing values
  3. 3Parse numbers
  4. 4Fill missing values
  5. 5Mark placeholders as missing

Show the answer

The order:

  1. Mark placeholders as missing
  2. Parse numbers
  3. Valid range rule
  4. Flag missing values
  5. Fill missing values

Clean the tokens, make it numeric, reject impossible values, record what's missing, and only then fill. Each step relies on the one before it.

Check yourself

You apply a recipe to customers v1. What happens to v1?

Show the answer

Answer: a

The dialog says it plainly: the source is never changed. Results keep pointing at the exact version they used.

07

Recap

Recap
  • A recipe is cleaning you can read, reorder and replay.
  • Order matters: each step sees the output of the last one.
  • Check each step's changes, and let applying write a new version.

Concepts in this lesson