Five steps of a survey report, each giving a number that looks plausible and is wrong: an average of province averages where a weighted mean was needed, a join that multiplies rows, a groupby that drops the plots with no crop, interview dates read month-first, and square meters added to hectares. Most of them raise no error; the checks find them.
For each one you predict, trace, fix and explain, as in the first drill. The companion has each fix and why it works.
What you do
Section titled “What you do”- The report that goes wrong: five bugs to find and fix
Its notebooks
Section titled “Its notebooks”- 45_debugging_drill.pyDebugging drill: the report that goes wrongRead itCompanion · 5 exercises
The notebooks are in your course folder; here you can read them without running anything. For reference in any module: primer: marimo and the python this course assumes and primer: pandas 2 to 3 and glossary.