Course · Beginner · Foundations
Python for Programme Data
The Python a monitoring and evaluation officer actually needs — environments, pandas, dates, categorical codes and file formats — taught on survey and registry exports rather than on toy data.
What you will be able to do
- Install and reproduce a working Python environment on a machine with no reliable internet, and explain why a system Python is the wrong place to work
- Read a CSV, Excel or fixed-width export without losing a leading zero, misreading a date, or letting a missing-value sentinel enter an average
- Select, filter and group a pandas DataFrame deliberately, and explain what SettingWithCopyWarning is telling you rather than silencing it
- Compute ages, reporting periods and age-band disaggregations correctly, including the month arithmetic a growth standard depends on
- Write a script another officer can run next quarter on a different export, without editing anything but its arguments
Standards and methodologies
This is a Python course, not an analysis course. It assumes you already know what an indicator is and why a denominator matters — Data Analysis Foundations teaches that — and spends its time on the language itself: what pandas is actually doing, which of its defaults will hurt you, and how to write something that still runs when you are not there.
Python only. Its sibling on the roadmap, R for Programme Data, does the same job in R. Elsewhere on this platform every technique is shown in both languages, because a team is usually split across them; here the split is the point, and covering both in one course would halve the depth of each.
Everything runs against real platform datasets — the MUAC screening register from twelve communes in Artibonite, a DHIS2-shaped vaccination extract, a school attendance file — with the leading zeros, sentinel codes, inconsistent dates and duplicate registrations those files actually carry. There are no toy DataFrames of three rows, because the errors this course exists to prevent do not appear at three rows.
You will not need internet in the room. Lesson 1 is about making sure of that.
Practice
Reading the lessons is not the same as having done the work. Each of these applies the course to a dataset it did not teach on.
- Lab · 90 minThe month nobody reportedA district's penta3 coverage appears to collapse in August. Build the script that decides whether that is a programme failure or a reporting failure, and make it survive next quarter's export without editing.
- Exercise · 45 minRead this export without breaking itOne CSV, six defects, and a read that has to survive all of them. Write the read_csv call and the four checks that prove it worked, then say what each defect would have cost.
Progress
Take it offline
The whole course as a typeset PDF — every lesson, every code example, the data dictionary and the indicator definitions. Generated from the same source as this page.
The LaTeX source ships alongside each PDF, so an organisation can rebrand the handout or fold a lesson into its own training pack.