Multilevel CSV Projects
Build a real data-processing workflow: read CSV → validate → transform → save CSV → read it in the next stage. Learn why every output must be checked before moving forward.
How a multi-stage pipeline works
Each stageNN.py reads input/… or the immediately preceding output/stageNN.csv. The master run_pipeline.py runs stages 1–6 in order and stops on an error. Stage-specific inputs, such as marks or an answer key, can be joined in addition to the preceding output.
Begin with CSV I/O and merging DataFrames if these operations are new to you.
Student Examination Results
Six stages: registration, marks, pass/fail, grading, city comparison and final reports
Intermediate · merges, validation, aggregate, rankExplore project →Project 2 · 6 stagesGrocery Inventory & Sales
Six stages: product master, transaction merging, stock, profits, category totals and final reports
Intermediate · joins, stock validation, vectorised maths, GroupByExplore project →Project 3 · 6 stagesCompetitive Exam Analysis
Six stages: response validation, key merging, negative marks, subject breakdown, accuracy and rank list
Intermediate+ · multi-file joins, scoring policy, GroupBy, rankingExplore project →See what each stage reads and writes
Choose a project and stage. The table on the left shows the real source CSV; the table on the right shows the committed output CSV snapshot. Run the Python scripts locally to recreate these files.
Choose a stage to inspect the CSV data.
Input CSV
Open input CSVOutput CSV
Open output CSVCSV snapshots are read-only and are hosted with the lesson. The browser does not execute Python or edit repository data. Inspecting a file is separate from running the local pipeline.
Run a complete pipeline locally
Each project includes actual Python sources, reproducible sample input files, starter exercises and test code. No registration or external API is required.
python -m pip install pandas
cd python/pandas/projects/csv-pipelines/student-results
python run_pipeline.py
python -m unittest discover -s . -p "test_*.py"
# Or run one stage at a time:
python stage01.py
python stage02.py
python stage03.py
python stage04.py
python stage05.py
python stage06.pyImportant: these projects demonstrate deterministic CSV-to-CSV batch processing. Data must be checked for duplicate keys, invalid values, unmatched joins and business-rule conflicts. Do not use sensitive real-world records in a public teaching repository.