Inventory before editing
Start by counting and recording what is there. Then make a cleaning plan that explains each change and its evidence.
Preserve the raw export. Record rows, distinct keys, expected IDs absent, missing cells, stored types, allowed values and ranges. Note which calculations use records versus valid measurements. A table may have more rows than students and still omit an expected student; three counts must be checked separately.
A defensible cleaning plan has the issue, affected record or value, proposed action, source evidence, and risk of an alternative. An audit log distinguishes rows removed, cells standardised, values flagged and records retained. These units must not be added together as if all were row removals.
Source: W3 PDF pp. 4-55. The 14-row registry example below comes from the Week 3 lab code you previously pasted in this conversation; it is separate from the lecture's smaller examples.
many_to_one is the lecture's key rule in code. Unique student keys on the right prevent registrations from multiplying.
The six quality dimensions are applied to a concrete task. The dictionary decides the score scale, date order and allowed programme meanings.
The lecture's audit trail becomes a final report. Structural checks verify stated rules, while source accuracy and broader claims still need separate evidence.
Practice problems
Supplementary study questions on the lecture concepts — not verbatim exam questions. Each answer counts toward spaced review.
1. Conceptual understanding
Definitions and distinctions.
Which counts should be checked before cleaning?
Can 14 rows represent 12 distinct students with no absent expected IDs?
2. Application
Apply the concept to a case or calculation.
A log says 2 rows removed and 5 cells standardised. How many rows were removed?
What does eq('') detect directly?
3. Interpretation and limitations
Evaluate assumptions and justify conclusions.
A cleaned table differs from raw. Is that by itself proof that the raw export was overwritten?
Which reason best supports removing an extra row?
Explain it in writing
Self-checked, not marked. Write a few sentences, then compare with the example answer. Your writing is saved as you type.
Show an example answer
The issue, affected records or values, number and unit affected, action, and supporting evidence. This lets another person understand and review the change.
Check: did you answer the question, use evidence or working, and avoid claiming more than the evidence supports?
Show an example answer
The checks may miss a wrong decision. The snapshot preserves the original values and lets you compare or reverse changes without inventing the past.
Check: did you answer the question, use evidence or working, and avoid claiming more than the evidence supports?