How to learn Python for data analysis
This path assumes you can sort and filter a spreadsheet, but not that you have programmed before. It gets you to the point where you can load a messy CSV or Parquet file, reshape and aggregate it, and defend the question the analysis answers.
Hours
150-180 hours
Calendar
about 25-30 weeks at 6 hours a week
Stages
6
Start from
You need arithmetic, basic spreadsheet sorting and filtering, and enough comfort with files and folders to locate a CSV file. You do not need prior programming or a statistics course; many people wrongly believe they need a maths degree before they can start.
Why the usual order fails
Most Python data analysis teaching puts syntax first: data types, loops, then pandas methods. The problem is that pandas is not the hard part. A careful learner can reproduce a `.groupby()` example in an afternoon. The hard part is standing in front of a raw dataset and deciding whether the columns can answer the question at all: whether the grain of the data supports a per-store comparison, whether the timestamp is actually a date, whether missing rows are random or meaningful. When syntax comes first, people learn to run operations without learning to choose among questions. Six weeks in, they can aggregate anything but cannot say what the aggregation means.
This path inverts the order. In week one you work with a small messy sales dataset and write plain-language questions, then classify each as answerable, partly answerable, or unsupported by the columns. You only meet the pandas operations needed to test those answers. Most plans would have you configuring Jupyter, printing data types, and memorising the difference between a Series and a DataFrame by the same point. Here you begin with the question and let the data object appear when it is needed. The result is slower at first and much faster when the datasets stop being tidy.
The path, in the order it has to be walked.
Each stage assumes the one above it and nothing below it. The check at the foot of each is the point — you are meant to fail it, go back, and try again before moving on.
Questions, columns, and grain
weeks 1-4This stage makes question formulation a separate skill before pandas syntax dominates. You inspect small CSVs by hand, name what one row means, and sort questions into answerable, partly answerable, and unsupported. It sits first because later failure is usually not knowing which question the columns support.
- rows as records
- primary and unique keys
- column grain
- meaning of missing rows
- question-to-column mapping
- answerable vs partly answerable vs unsupported
- plain-language query plans
You can now: Given a new CSV, you can write 20 questions and mark each as answerable, partly answerable, or unsupported from the columns in under two hours.
Pandas core verbs
weeks 5-8Now that questions lead, you learn just enough pandas to answer them: reading files, selecting columns, filtering rows, creating grouped summaries, and joining two tables. It sits here rather than earlier because each verb is tied to a question you already wrote.
- pd.read_csv
- pd.read_parquet
- boolean masks
- .groupby().agg()
- .pivot_table()
- .merge()
- sorting and head
- Series vs DataFrame
You can now: Take a small CSV and replicate a spreadsheet pivot table in pandas with a groupby and an aggregation in an afternoon.
Repairing real tables
weeks 9-13You now meet missing values, wrong dtypes, messy strings, dates stored as text, duplicates, and wide-to-long reshaping. This is the work that consumes most of a real analysis. It comes after the core verbs because you need a reason to clean before you touch the repair methods.
- isna and fillna
- astype
- .str.replace
- pd.to_datetime
- drop_duplicates
- melt and pivot
- categorical dtype
You can now: Take a deliberately messy CSV with mixed dtypes and nulls and produce a clean table with one typed column for each question you asked.
Exploratory plots that answer questions
weeks 14-18You use visualisations to test the answerable questions from stage one, not to decorate. The stage covers distributions, group comparisons, trends over time, and relationships between numeric columns. It sits here because a plot means little until the table is clean and the question has a shape.
- matplotlib.pyplot
- seaborn.histplot
- sns.boxplot
- sns.scatterplot
- plotly.express
- correlation matrix
- line plots with time index
- small multiples
You can now: Given a cleaned dataset, create three plots and state which one best answers the question, with the trade-off visible in the chart.
Statistical checks on your answers
weeks 19-23You add uncertainty checks to stop treating sample patterns as facts. You learn confidence intervals, t-tests, chi-squared tests, correlation with p-values, and simple linear regression. It sits after exploration because numbers should be checked only after the pattern and its business meaning are clear.
- confidence intervals
- t-test
- chi-squared test
- p-value vs effect size
- correlation vs causation
- statsmodels linear regression
- residuals
- sampling variation
You can now: Run a t-test or chi-squared test on a real comparison and write one sentence about whether the difference matters practically, not just statistically.
Reproducible analysis projects
weeks 24-28The final stage turns notebook experiments into repeatable scripts and projects. You organise code into functions, add data checks, manage dependencies, and record the question each analysis answers. It comes last because reusable structure matters most after you know which steps recur.
- notebook-to-script conversion
- functions with type hints
- pytest data checks
- virtualenv and requirements
- pathlib
- logging
- git commits
- storing processed Parquet files
You can now: Turn a notebook analysis into a script that a colleague can run on a fresh CSV and get the same table and chart.
The hours are fixed. The calendar is yours.
The same path at three speeds, and what actually goes wrong at each.
3 hours a week
At 3 hours a week you finish in 50-60 weeks. The main risk is decay: pandas syntax and question-framing habits fade between sessions, so you spend much of each session re-reading what you wrote.
8 hours a week
At 8 hours a week you finish in 19-23 weeks. This is sustainable for a working analyst because you have enough each week for one cleaning task, one visualisation, and one short recap without losing context between sessions.
20 hours a week
At 20 hours a week you finish in 8-9 weeks. You can cover syntax quickly, but question judgement and messy-data debugging lag because they need repeated exposure across different datasets, not one long sprint.
Four ways people lose a year on this.
Each of these is appealing for a real reason, which is why they are common. What they cost is the part nobody mentions.
Collecting pandas method tutorials
People watch tutorials on index methods, merge options, and groupby tricks and call it learning analysis. The appeal is that syntax is visible and easy to tick off. The cost is that they cannot face a raw data dictionary and decide which operation matches the question; their notebooks fill with isolated examples, not answers.
Practising on clean toy datasets
Many courses use tidy CSVs with no missing values, uniform dates, and one row per sale. That feels productive because the code runs on the first attempt. Real datasets have duplicate IDs, mixed dtypes, and timestamps that are not dates. The first real project then stalls on repair work the learner never practised.
Running describe and calling it analysis
People type `df.describe()` and generate a wall of summary statistics, then believe they have analysed the data. It is attractive because it runs in seconds. The cost is that no question has been stated, no comparison made, and the output cannot support a decision; the summary becomes decoration.
Using pandas for statistics without uncertainty checks
Pandas makes means and correlations easy, so learners compare two groups and declare a difference. They do not account for sample size or noise. The appeal is that the code is short. The cost is a false conclusion: a gap of five sales per store may be random, but the DataFrame will still show it.
How to know it worked.
Not a syllabus you tick off — six things to attempt. If one of them is still hard, the stage it belongs to is the one to go back to.
- Load a CSV and print the first five rows.
- State what one row represents in a dataset you have not seen before.
- Filter a table by two boolean conditions and count the rows.
- Group a messy sales table by store and month, and explain the grain of the result.
- Join two tables and find which rows failed to match.
- Run a t-test and state whether the difference is practically meaningful, not just p<0.05.
Questions about learning Python for data analysis.
The five we hear most. The intro film answers most of them in a minute and a half.
how long does it take to learn python for data analysis
Count 150-180 hours of deliberate practice, or about 25-30 weeks at 6 hours a week, to reach working competence on messy real datasets. You can learn pandas basics in 20 hours, but useful analysis takes longer because cleaning, reshaping, and question formulation are the real workload. Treat the first 20 hours as syntax only; the rest is judgement.
do i need to know statistics before learning python for data analysis
No. You need arithmetic and basic spreadsheet experience. Learn enough statistics alongside Python once you can group and reshape data; starting with full statistics theory before touching real datasets often delays the moment you can test a question. The required statistics are confidence intervals, t-tests, and regression, not a full maths degree.
is pandas enough for data analysis
For many tabular analyses, pandas plus matplotlib or seaborn is enough to clean, aggregate, and plot. It is not enough for very large out-of-memory datasets, database-scale joins, or uncertainty checks such as confidence intervals and regression diagnostics, for which you will add DuckDB, SQL, statsmodels, or scipy.
should i learn python before excel for data analysis
If you already use Excel for sorting and filtering, you can learn Python directly. Excel is useful for quick views and business sharing, but Python handles larger datasets, reproducible cleaning, and joins more explicitly. The transferable skill is knowing which question a table can answer.
what order should i learn pandas, numpy, and matplotlib
Start with pandas selection and grouped summaries, then basic matplotlib visualisations, and add numpy only when you need arrays or vectorised operations. Learning numpy first because it feels fundamental is a common trap; most tabular analysis does not require direct numpy until you write custom functions or handle missing numeric values.
A path is not a course.
This is the shape of Python for data analysis, not the teaching of it. Hand the same path to BiliMind and it writes the lessons onto it — in the form each one calls for, with practice that gets marked and a schedule that bends when your week does. Mapping a course is free and unlimited.
This roadmap was drafted on 18 September 2026 by the same engine that builds BiliMind courses, and reviewed before publishing. Hours are honest estimates for working competence, not for a demo — treat them as a starting point and adjust them against your own first fortnight.

