Skip to main content

Lessons and exercises

NumPy and pandas, and the shift from writing loops to describing operations on whole columns. Most of the difficulty is not syntax but knowing what a dataset actually contains before analysing it.

Lesson 6.1

Arrays and Vectorised Operations

A NumPy array applies an operation across every element at once, which is both faster and clearer than an explicit loop.

Lesson 6.2

DataFrames

A DataFrame is a table with labelled rows and columns. Selecting by label and selecting by position are different operations with different methods.

Lesson 6.3

Cleaning and Missing Data

Real data has gaps, duplicates, and wrong types. Every choice about them changes the result, so each must be deliberate and recorded.

Need help with this topic?

Work through questions with a tutor and get help with the steps you find difficult.

Get help with this topic