Skip to content
Learn Python with BNHR

Debugging drill D1 · Beginner

Debugging drill: a table that lies

The first debugging drill of Arrays & DataFrames, after module 3: six bugs in reading and selecting the farm survey, to predict, trace, fix and explain.

Extra D1Level Beginner
On this page
  1. Overview
  2. What you do
  3. Its notebooks
  4. Certification and support

Six short functions on the farm survey, each with one mistake that makes a table say something untrue: area codes that lose their leading zero, a filter written with and instead of &, a comparison with a missing value, an assignment that never reaches the table, numbers read as text, and values that land on the wrong rows. 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. The last one raises no error at all; only its check finds it. The companion has each fix and why it works.

  1. A table that lies: six bugs to find and fix

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.

Saved in this browser only

Certification and support

We offer additional resources, certificates, ongoing support, and other perks to those who join our instructor-led training.

Join an upcoming training to take this as an instructor-led course, or contact us to arrange one for your team or organization.

Something new

Identify results
LayerExplore a capstone
CapstoneCapstone
AboutThe capstone of Arrays & DataFrames: in groups, build something that fixes a real problem with the farm survey or the prices, then show it working.
CourseArrays & DataFrames, free