I2 · Working with Data: NumPy, pandas, SQL and Visualisation

Module Review and Assessment

This review brings together Working with Data: NumPy arrays, shapes, broadcasting and statistics; pandas Series and DataFrames; reading, exploring, selecting, filtering, grouping, merging and reshaping data; handling missing values, duplicates, wrong types, outliers, text and dates; databases and SQL with SQLite; and visualisation with Matplotlib, statistical charts, exploratory data analysis, data storytelling and dashboards, followed by a scored quiz.

15 min Intermediate · Sublevel Beginner Jump to the activity

What you need: The earlier topics of this module.

Definition

Could you now load a messy data set, clean it with pandas, store and query it with SQL, explore it with summaries and charts, and present what you found in a clear chart or dashboard?

This review brings together Working with Data: NumPy arrays, shapes, broadcasting and statistics; pandas Series and DataFrames; reading, exploring, selecting, filtering, grouping, merging and reshaping data; handling missing values, duplicates, wrong types, outliers, text and dates; databases and SQL with SQLite; and visualisation with Matplotlib, statistical charts, exploratory data analysis, data storytelling and dashboards, followed by a scored quiz.

In simple words

Read the recap table, try the activities, then take the quiz. Each answer comes with an explanation. If you miss one, go back to that topic.

Why it matters

Every AI project spends most of its time on data. These skills let you prepare data for models, check its quality and communicate what it shows.

How it works

TopicKey idea
NumPyFast arrays; shape, indexing, vectorised maths and broadcasting
pandas basicsSeries and DataFrames; read_csv; head, info, describe
Transforming dataBoolean filters, sort_values, groupby with agg, merge, pivot and melt
CleaningMissing values, duplicates, types, outliers, text and dates
DatabasesTables, keys and SQL: SELECT, WHERE, GROUP BY, JOIN
VisualisationMatch chart to question; label axes and units; bars from zero
EDAShape, quality, summaries, distributions, relationships, groups; always plot
CommunicationAction titles, highlight, annotation, honest context; dashboards with KPIs

Try it yourself

Match the task to the tool

Which tool or method fits best?

  • Average marks for each school
  • Combine a students table with a schools table
  • Count missing values per column
  • See how a variable changes over time
  • Compare distributions across groups

True or false?

Decide for each statement.

  • Data sets with identical statistics always look the same when plotted

  • Dropping all rows with any missing value is always best

  • Bar charts should start at zero

  • SQL GROUP BY is similar to pandas groupby

Common mistakes

  • Modelling before exploring and cleaning the data.
  • Charts without labels, units or honest scales.
  • Losing track of cleaning steps so results cannot be repeated.

Check yourself

Question 1

1. An array has shape (3, 4). How many elements does it have?

Question 2

2. Which pandas method gives count, mean, standard deviation and quartiles?

Question 3

3. df[df["marks"] > 80] does what?

Question 4

4. Which SQL clause combines rows from two tables on a key?

Question 5

5. Which chart best shows a relationship between two numeric variables?

Question 6

6. In a box plot, the box covers…

Question 7

7. What is the first step of an EDA workflow?

Question 8

8. Which chart title is best for storytelling?

Question 9

9. A good dashboard KPI should…

Question 10

10. Why plot data even when summary statistics look fine?

Summary

  • NumPy and pandas load, clean, filter, group, merge and reshape data; SQL stores and queries it.
  • Explore before modelling: summaries plus plots, groups checked separately.
  • Communicate with honest, focused charts, clear stories and useful dashboards.

Finished reading?

Sources: pandas: chart visualization · Matplotlib: user guide and tutorials