Lesson 2: Where the data lives: columns, partitions and tables
Module 5 · Lesson 2 · About 50 minutes · Needs: lesson 1 (the nightly files), pandas, and a little SQL (SELECT,WHERE,GROUP BY).
The situation
Week 5, Wednesday. Lesson 1's flow lands a file per depot per night. Now Adaeze wants every parcel since 6 July in one place that training, monitoring and Morag's questions can all read. Morag's question this morning: "How many parcels did Dartford collect in the week of 7 September, and how many were late?" Tomasz warns that whatever you build has to survive a day being rewritten, because lesson 3 will correct September's weights.
That question runs through the lesson: Dartford, week of 7 September 2026 (simulated): 2,212 parcels, late rate 0.111. The point is not the answer but how little data you can read to get it.