Wrangle / Preprocess
Start after Inspect. Protect the original, then clean, reshape and combine with a reason for every change.
01 / A safe working copy
Protect the original
Make changes on a separate working copy.
8 min · 3 practicesRename columns
Give a column a clear name.
8 min · 3 practicesKeep / reorder columns
Choose a deliberate column order.
8 min · 3 practicesDrop columns
Remove an explicitly unwanted field.
8 min · 3 practicesFilter unwanted rows
Keep observations using a clear rule.
8 min · 3 practicesSort and reset
Sort records and give the result a simple index.
8 min · 3 practicesReview · Keep the evidence
Retrieve earlier skills on a fresh table.
12 min · 3 retrieval tasks02 / New columns & clean text
Create a numeric column
Calculate a whole column at once.
8 min · 3 practicesCreate a conditional column
Choose values using a Boolean rule.
8 min · 3 practicesRecode categories
Map known labels and preserve unknown ones deliberately.
8 min · 3 practicesClean text
Remove accidental spaces and inconsistent letter case.
8 min · 3 practicesSearch / extract text
Select text matches and split structured names.
8 min · 3 practices03 / Types, dates & missingness
Convert numeric text
Turn numeric-looking strings into usable numbers.
8 min · 3 practicesBridge review · Sections 02 + 03
Revisit new columns (W07) and clean text (W10) from Section 02, then numeric conversion (W12) from Section 03.
12 min · 3 retrieval tasksConvert data types
Choose a type that fits the values.
8 min · 3 practicesParse dates
Convert date text and handle invalid dates visibly.
8 min · 3 practicesWork with dates
Extract useful calendar features from parsed dates.
8 min · 3 practicesDrop missing rows
Exclude only rows missing a required field.
8 min · 3 practicesFill missing values
Choose and document an imputation rule.
8 min · 3 practicesRemove duplicates
Remove verified extra copies.
8 min · 3 practicesReview · Gaps and duplicates
Retrieve earlier skills on a fresh table.
12 min · 4 retrieval tasks04 / Groups & reshaping
Group and aggregate
Create readable, named group summaries.
8 min · 3 practicesGroupwise transformation
Add a group statistic beside each original row.
8 min · 3 practicesBuild a pivot table
Summarise a measurement across two category axes.
8 min · 3 practicesWide → long
Turn measurement columns into variable/value rows.
8 min · 3 practicesLong → wide
Reshape unique identifier/measurement pairs.
8 min · 3 practicesCombine tables by keys
Join a lookup table while checking the relationship.
8 min · 3 practicesReview · Reshape and connect
Retrieve earlier skills on a fresh table.
12 min · 4 retrieval tasks05 / Combining & preparing
Stack datasets
Append compatible observations vertically.
8 min · 3 practicesCreate bins
Turn numbers into labelled intervals.
8 min · 3 practicesEncode categories
Represent category membership as indicator columns.
8 min · 3 practicesScale numeric columns
Compare standardisation with min–max scaling.
8 min · 3 practicesHandle outliers responsibly
Flag unusual values without deleting evidence.
8 min · 3 practices