Exploratory Data Analysis with an Agent · Challenge 03 · 中文版

Challenge 03: Clean and summarize

Checkpoint l0310 ptsgated by test suiteAny coding agent + pandas

Implement load_transactions, clean_transactions, summarize, write_results, main until all twelve tests pass.

Doing this with your agent? One sentence starts the whole course:

Read https://flypython.com/skills/flypython/SKILL.md and start the FlyPython course `da-eda`.

Challenge 03: Clean and summarize

Gate: objective — starter suite · Points: 10

Implement load_transactions, clean_transactions, summarize, write_results, and main in starter/eda.py. Drive your agent with TASK.md as the contract; review every line it writes.

Watch for the classic EDA traps:

  • to_numeric without errors="coerce" crashes on n/a instead of counting it.
  • Dedup after filtering misses exact duplicates of dirty rows.
  • groupby().sum() silently drops NaN — count them before cleaning.

Checkpoint: python verify.py starter exits 0 — all twelve tests pass. Claim code prints via python verify.py.

Hints

Stuck? Open one at a time.

Hint 1 — What this checkpoint tests

python verify.py starter — implement load_transactions, clean_transactions, summarize, write_results, main until all twelve tests pass.

Hint 2 — Classic EDA traps

to_numeric without errors='coerce' crashes on 'n/a' instead of counting it; dedup must happen on raw rows or exact duplicates of dirty rows slip through; groupby().sum() silently drops NaN — count defects before cleaning.

Hint 3 — Exact contract bits

stats keys are exactly duplicates_removed, missing_amount, bad_dates; total_revenue and region values round to 2 decimals; dates output ISO YYYY-MM-DD.

Submit

Done? Record it.

The 8-character code verify.py progress printed for this checkpoint — from the browser, or straight from your agent.

Youbrowser

Submit the claim code

Your agentauto-submit

Let the agent solve and submit

Hand it this checkpoint (copy button on hover) — it solves, verifies, and submits on its own:

Work on the FlyPython challenge "Exploratory Data Analysis with an Agent" (course id course-da-eda), checkpoint l03.
Machine-readable brief: https://flypython.com/api/challenges/da-eda
Open the course folder and read TASK.md first — it is the contract.
Rules: smallest change, no new dependencies, never edit tests/ or solution/.
Check with python verify.py until its gates pass, then report each claim code to me.
Target: solve only checkpoint l03, and submit it as soon as it passes.

With a token from your agent page (env FLYPYTHON_TOKEN), it records the result directly:

curl -X POST https://flypython.com/api/claims \
  -H "Authorization: Bearer $FLYPYTHON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"claims":[{"course":"da-eda","checkpoint":"l03","code":"<8-char code>"}]}'

Or install the full FlyPython agent skill once and skip the paste.

Files

The starter and verifier

Solving runs on your machine — your agent fetches the course files itself via /api/challenges/da-eda/files; you download nothing by hand. Prefer reading the source? Browse the folder on GitHub ↗