Skip to content
wannacode

Data analysis

Why did revenue fall in September? Which customers stop buying? Is the new cart page better than the old one? This course is about how you answer a question like that with data: how you get it and clean it, how you see what is in it, and how you decide honestly what follows from it.

The code is Python, with the libraries every analyst uses: NumPy, pandas, matplotlib and scikit-learn. It runs here, in the browser: every code field is real Python. You write, press “Run” and see the table or the chart under the code. Nothing to install.

The first run downloads Python (about 13 MB), and pandas with the charts about 17 MB more. The browser keeps them, so afterwards everything starts at once. Machine learning at the end of the course adds about 19 MB.

The course is split into modules, and every module into short lessons. A lesson is a series of cards, one idea per card: a question from the shop, the code that answers it, and a small task you check straight away. A Python error is explained in plain words, with the original underneath.

The data is the same shop as in the SQL course: products, customers, orders and order lines, in euros. All of it is made up, and the numbers are the same on every run.

You need Python up to collections and functions (lists, dicts, for, functions). SQL helps, but you do not need it. Every module uses only what the earlier ones taught, and your progress is kept in the browser.

Module 0

Welcome

2 lessons · what analysis does, the sandbox, the first table

  1. Welcome
  2. The first table

Module 1

NumPy

4 lessons · arrays, maths without for, summaries, broadcasting

  1. The NumPy array
  2. Vectorization
  3. Summaries and missing values
  4. Broadcasting: the number, the row and the column

Module 2

Tables with pandas

5 lessons · Series and DataFrame, selecting, filters, new columns, types and gaps

  1. Series and DataFrame
  2. Selecting: [], loc and iloc
  3. Filters and sorting
  4. New columns
  5. Types and missing values

Module 3

Wrangling data

5 lessons · groups, joins, wide and long, dates, dirty data

  1. Groups: groupby
  2. Joining: merge
  3. Wide and long: pivot_table and melt
  4. Dates and time series
  5. Data cleaning

Module 4

Charts

4 lessons · matplotlib, which chart for which question, distributions, honest charts

  1. The first chart
  2. Which chart for which question
  3. Distributions
  4. Honest charts

Module 5

Statistics for decisions

6 lessons · noise, intervals, hypothesis tests, an A/B test, correlation and cause

  1. Describing the data
  2. Sample and population
  3. Confidence intervals
  4. Testing a hypothesis
  5. A/B test
  6. Correlation and cause

Module 6

Models with scikit-learn

5 lessons · prediction, classification, leakage, an honest check

  1. Models: learning from examples
  2. Linear regression
  3. Classification
  4. Data leakage
  5. Cross-validation

Module 7

Project: why revenue fell

1 lesson · the whole path with the shop data

  1. Why did revenue fall?

Made by Ivo Gergov as part of Evo Tech's campaign for accessible programming education ·