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.
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
Why not edit the data?
ReadSpreadsheet 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 listLet the profile start you off
In the appAdd 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.
Order matters
PredictPredict 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?
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.
Check what each step did
ExploreSelect 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.
Learned values
ReadSome 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.
Check your understanding
CheckpointCheck yourself
Put these steps for a messy age column in a sensible order.
Show the answer
The order:
- Mark placeholders as missing
- Parse numbers
- Valid range rule
- Flag missing values
- 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.
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