ME204 2026 Icon

🖥️ Week 01, Day 04 - Lecture

Why We Like Our Data in Tables

Author

Dr Jon Cardoso-Silva

Last updated

16 July 2026

🥅 Learning Objectives

By the end of the lecture, you should be able to: i) Explain why tabular data beats hand-written loops for inspection and filtering, ii) Load a CSV into a pandas DataFrame and inspect its shape, columns, and types, iii) Summarise a column with .describe(), filter rows with a Boolean condition, and group by a key, iv) Explain why the documentation page matters when you use AI-generated code, v) State what the midterm asks you to do and how the OpenWeather API differs from Open-Meteo.

Thursday, 16 July 2026 | 10:00am - 1:00pm 📍 CBG.2.01 (see LSE’s 🗺️ campus map)

Yesterday you fetched weather data with requests and wrote a CSV by hand. This morning we ask what changes when the same data is in a table, and we redo yesterday’s analysis with pandas.

🗣️ Lecture Overview

  • From loops to tables: what you built this week, and why pandas replaces the bookkeeping
  • pd.read_csv() and the inspection toolkit: shape, columns, dtypes, .head()
  • Filter, summarise, group: Boolean filters, .describe(), adding a column, .groupby()
  • Documentation as ground truth: styling a table with AI, then checking against the pandas docs
  • Midterm project: the question, the OpenWeather API, and how the afternoon lab starts your setup

🎬 Lecture Slides

Use keyboard arrows to navigate. Select the slides below or view fullscreen.

After the Lecture

You have seen the pandas operations on yesterday’s London rainfall data. The afternoon lab is where you start the midterm: OpenWeather signup, project folder setup, and your first authenticated API request.

💻 Today’s Lab

Authenticating to APIs: API key, project folder, first request.

➡️ Go to Lab Instructions

Questions?

Ask your class teacher during the lab.