
The quickest useful route into Python data analysis is a small project you can rerun from beginning to end. Learn enough Python to read a table, inspect its values, transform selected columns, and write a checked summary. Your first deliverable should explain the data and the calculation, not just display a notebook full of successful outputs. This roadmap uses a fictional parcel dataset so that every expected answer can be verified without private information or a large download.
Learn the language needed for one dataset
Begin with variables, lists, dictionaries, comparisons, and functions. Practise a function that accepts two numbers and returns their difference. Then deliberately pass an unexpected value and read the resulting error. The official Python tutorial is aimed at programmers new to Python, so complete smaller introductory exercises first if programming itself is new Source 1. You do not need classes or a web framework to start this analysis.
Create a folder with data, analysis, and outputs directories. Keep the original CSV untouched and write derived files elsewhere. Record the Python and pandas versions used. A reproducible project is easier to debug than a collection of notebooks scattered across Downloads, particularly when the working directory changes between sessions.
Read and inspect before transforming
Build a fictional table with parcel_id, route, planned_days, and actual_days. Use five records: North with 2 and 3 days, North with 2 and 2, South with 3 and 5, South with 3 and 3, and West with 2 and a blank actual value. Give each parcel a unique ID. The blank represents a delivery whose completion is not yet known.
Read the CSV into a pandas DataFrame. Inspect column names, a few rows, data types, row count, and missing-value counts. The pandas introductory lessons cover these table operations Source 2. Do not assume a numeric-looking column is numeric. A stray unit label such as “3 days” should prompt an explicit cleaning rule rather than a silent coercion that you never inspect.
Calculate delays with an explicit denominator
Create delay_days as actual_days minus planned_days for completed parcels. The known delays are 1, 0, 2, and 0. There are four completed parcels, two late parcels, and one unfinished parcel. The average delay across completed parcels is 0.75 days. The late share among completed parcels is two divided by four, or 50%. It is not two divided by five unless you deliberately define a different metric.
Summarise average delay by route for completed records: North is 0.5 days and South is 1 day. West has no completed observation, so do not invent a zero average. Write a separate count of missing completion values. The pandas read/write tutorial explains importing and exporting tables Source 3; save both a route summary and a small exception report so your decision is visible.
Add simple assertions: five input records, unique parcel IDs, four completed records, and three total delay days among completed parcels. An assertion is a check that stops the script when an expected condition is false. It does not prove the entire analysis is correct, but it catches changes that would otherwise pass unnoticed.
Explain and rerun the result
Write three sentences for a fictional operations reader. State that two of four completed parcels were late, that the sample is tiny, and that one parcel has no completion value. Avoid blaming a route or driver because this dataset contains no causes. A chart may compare the two observed route averages, but it must also show the observation counts so a single large delay is not disguised as a robust pattern.
Restart your notebook kernel or run your script in a fresh process. Execute everything in order and confirm that the outputs appear without hidden variables from earlier experiments. Add a sixth completed parcel with zero delay and predict the new average before rerunning: three delay days divided by five completed parcels equals 0.6 days. The late share becomes 40%.
Package the CSV, analysis code, environment notes, expected numbers, and a short readme. For your next exercise, read a second table containing route descriptions and validate the join. Keep automation proportionate: a clear script that fails on unexpected inputs is preferable to a complicated pipeline whose outputs you cannot explain.
- LearnPractise variables, conditions, and a small function.
- InspectRead CSV types and missing values.
- TransformCalculate delays under a stated rule.
- ReproduceRun from a fresh process and compare expected outputs.
| Checkpoint | What to produce | How to review it |
|---|---|---|
| Input check | Five fictional parcels | Unique IDs and one missing completion |
| Derived measure | Delay in days | Actual minus planned, only when known |
| Summary | 0.75 days average delay | Three delay days divided by four completed parcels |
| Change test | 0.6 days after sixth parcel | Recalculate the denominator explicitly |
- Known completion
- Include in completed-parcel delay calculations.
- Unknown completion
- Report separately; do not substitute a zero.
- Invalid input
- Stop or log the problem before reporting a result.
Common questions
Should I learn pandas before basic Python?
Learn a small amount of Python first so variables, function calls, and error messages are not mysterious. Then learn pandas alongside a table project. You do not need to finish every language topic before analysing data, but copying chained operations without understanding their inputs makes even a small failure difficult to diagnose.
Is a notebook better than a script?
A notebook is helpful for exploring values and explaining intermediate results. A script is convenient for a repeatable sequence. Either can support this exercise. The important test is running from a clean state in order. Hidden notebook variables are a problem when a result depends on a cell that was never saved.
Should I replace missing delivery days with zero?
No: zero actual days means immediate completion, while a missing value means completion is unknown in this exercise. Substituting zero would create negative delays and distort the average. Keep the incomplete parcel in an exception count, then make the denominator of every completed-parcel metric explicit in the report.
Why use assertions in a beginner project?
Assertions turn assumptions into checks that can fail visibly. For this dataset, unique IDs and a known record count help detect accidental duplication or missing rows. Use checks that protect the analysis rather than merely repeating the same formula. When real data changes, revise the expectation deliberately and document why.
Do I need machine learning next?
Not for this roadmap. Cleaning data, selecting a denominator, checking joins, and communicating uncertainty are substantial skills on their own. Try a second reproducible analysis first. Machine learning becomes relevant when you have a defined prediction problem, suitable data, and a way to evaluate performance beyond fitting the available examples.
How should I handle an error message?
Read the final error line, locate the referenced operation, and inspect the type and value of its inputs. Reduce the problem to a small example. Search the official documentation for the relevant function, then rerun the failed check. Avoid suppressing every exception simply to make the notebook finish without visible errors.
Can I use an online notebook service?
You can use one for fictional or appropriately public data if its access and storage arrangements suit you. Do not upload private operational records merely for convenience. Export your code and outputs so your project is not dependent on one session. Record any packages the hosted environment supplied automatically.
What should a reviewer be able to reproduce?
They should recreate the delay column, four completed records, two late records, and the 0.75-day average from the provided CSV. Your readme should explain the missing-value rule and tool versions. A screenshot alone is insufficient because it does not show whether the result came from the submitted code and data.
Continue your learning
SQL Learning Roadmap: From Basic Queries to a Useful Analysis. Statistics for Beginners: A Learning Roadmap for Interpreting Data.
Sources and further reading
- Python tutorial — Language learning scope and basic Python constructs.
- pandas introductory tutorials — DataFrame inspection, selection and summary operations.
- pandas table input and output — Read and export tabular data.
Skills & Learning Desk
MP Job Hub’s organisational byline for sequenced practice, course evaluation and useful learning habits.
Skill roadmaps · Learning resources · Practice projects
View profile →Read our research process or request a correction.



