Six short pieces of pipeline on the survey, each with one mistake that makes the flat table say something untrue: an area code that loses its leading zero, a join that multiplies rows, a deletion filter negated halfway, the export’s null token read as text, codes compared as numbers against text, and a stray second download attached as a region. Each check starts red: that is the point.
For each one you predict what the code gives, run it, trace the line that makes the difference, fix it, and say in one sentence what the mistake was. Two of them raise an error; the other four return a wrong table without one, and only the check finds them. The companion has each fix and why it works.
What you do
Section titled “What you do”- A flat table that lies: six bugs to find and fix
Its notebooks
Section titled “Its notebooks”- 35_debugging_drill.pyDebugging drill: a flat table that liesRead itCompanion · 6 exercises
The notebooks are in your course folder; here you can read them without running anything. For reference in any module: primer: from r to python and primer: survey sampling in one page and glossary.