Data Science Fundamentals

The data science process in plain Python: reading, cleaning and reshaping data, summaries, groups and joins, relationships, time series, prediction and evaluation.

Level
Intermediate
Time
About 28 hours
Modules
5
Lessons
15
Exercises
45

Data science turns raw records into answers people can act on. This course teaches the whole process, from a vague question and a messy file to a cleaned table, honest summaries, a first predictive model and a clear report.

Everything is written in plain Python, so you see exactly what tools such as pandas and scikit-learn do for you. Every example runs step by step in your browser, and every exercise is checked against hidden tests.

What you will learn

  • Turn a question into an analysis plan and read CSV and JSON data
  • Clean, reshape and validate messy data and log every decision
  • Summarise, group and join tables to answer questions
  • Explore distributions, relationships and time series without being misled
  • Build and evaluate simple predictive models against a baseline
  • Run a reproducible, honest analysis from raw data to report

Skills you will gain

  • Data cleaning
  • Tidy data and reshaping
  • Descriptive statistics
  • Grouping and joining
  • Exploratory analysis
  • Model evaluation

Before you start

  • The Python course, or comfort with lists, dictionaries, loops and functions
  • Basic statistics helps: the mean, the median and percentages
  • Nothing to install: all code runs in your browser

Where it is used

  • Business and product analytics
  • Reports and dashboards
  • Research data analysis
  • A foundation for pandas and machine learning

Modules

Module 1: Getting started with data

What data science is, how tables, types and variables work, and how to read CSV and JSON data with plain Python.

  1. 1

    What data science is Intermediate

    The data science process from a question to an answer: asking a precise question, collecting and cleaning data, exploring it, modelling it and communicating what was found, with a first analysis in plain Python.

  2. 2

    Data types and tables Intermediate

    The kinds of variables a dataset holds (numeric, categorical, ordinal, yes/no, text and dates), how a table is organised in rows and columns, and how to inspect a table's shape, types and missing values.

  3. 3

    Reading CSV and JSON data Intermediate

    Loading the two most common data formats with the standard library: CSV with csv.reader and csv.DictReader, including quoted fields, JSON with json.loads and json.dumps, and converting text values to the right types.

Module practice and quiz →

Module 2: Cleaning and shaping data

Handling missing values, duplicates and inconsistent entries, reshaping between wide and long tables, and working with dates and text.

  1. 1

    Cleaning data Intermediate

    Finding and fixing the problems real data has: missing values, inconsistent text, impossible values and duplicates, and the choices between dropping, flagging and filling, with mean, median or a default.

  2. 2

    Tidy data: reshaping tables Intermediate

    The tidy data principles (each variable a column, each observation a row, each value a cell), melting wide tables into long ones, pivoting long tables into wide ones, and splitting columns that hold two variables.

  3. 3

    Dates, times and text Intermediate

    Parsing dates and times with datetime and strptime, extracting parts such as the weekday, measuring differences with timedelta, and normalising free text so that the same answer written differently is counted once.

Module practice and quiz →

Module 3: Summarising and combining

Describing columns with centre and spread, grouping and aggregating, and joining tables on keys.

  1. 1

    Descriptive statistics Intermediate

    Summarising a numeric column: the mean, median and mode for its centre; the range, variance, standard deviation, quartiles and IQR for its spread; and finding outliers with the 1.5 × IQR rule.

  2. 2

    Grouping and aggregation Intermediate

    Split, apply, combine: grouping rows by one or more keys with dictionaries, aggregating each group with counts, sums, means, minimums and maximums, sorting the results, and building cross tabulations.

  3. 3

    Joining tables Intermediate

    Combining tables through a shared key: building a dictionary index, inner joins that keep matches, left joins that keep every row of one table, many-to-one relationships, and finding rows that match nothing.

Module practice and quiz →

Module 4: Exploring relationships and time

Exploratory data analysis with profiles and histograms, relationships between variables and their traps, and time series basics.

  1. 1

    Exploratory data analysis Intermediate

    Getting to know a dataset before modelling it: profiling every column, counting missing values, drawing text histograms with bins, and writing down questions and surprises as you go.

  2. 2

    Relationships between variables Intermediate

    How two columns move together: scatter thinking, Pearson's correlation for every pair of columns, confounders, spurious correlations and Simpson's paradox, where a trend reverses when groups are combined.

  3. 3

    Time series basics Intermediate

    Data measured over time: sorting by date, totals per month, percentage change, moving averages that smooth out noise, seasonality, and flagging unusual days with a rolling mean and standard deviation.

Module practice and quiz →

Module 5: Prediction and practice

Training and test sets, baselines and simple models, evaluating classifiers, and running a reproducible, honest analysis.

  1. 1

    Prediction basics Advanced

    The core ideas of predictive modelling in plain Python: features and targets, training and test sets, a baseline to beat, a least-squares line, nearest neighbours, and error measures such as MAE and RMSE.

  2. 2

    Evaluating classifiers Advanced

    Judging yes/no predictions properly: the confusion matrix, accuracy and why it misleads on rare classes, precision, recall, the F1 score, and choosing a decision threshold.

  3. 3

    The data science workflow Advanced

    Putting the steps together into a reproducible analysis: a pipeline from raw data to report, train and test discipline, data leakage, documenting cleaning decisions, ethics and privacy, and communicating results honestly.

Module practice and quiz →

Projects

Final assessment →

What to learn next