πŸ—£οΈ Week 04 Lecture

Working with Tabular Data in Python (NumPy & Pandas)

Author

Dr Jon Cardoso-Silva

Published

13 February 2025

πŸ₯… Learning Goals
By the end of this lecture, you should be able to: i) Understand the advantages of NumPy arrays over Python lists. ii) Perform vectorised operations using NumPy. iii) Explain the relationship between NumPy and Pandas. iv) Use basic Pandas operations for data analysis. v) Apply these concepts to real-world weather data analysis.
DS105W course icon

Last Updated: 14 February 2025, 14:30 GMT (to include model solutions and lecture notebook)

πŸ“Time and Location: Thursday, 13 February 2025 from 4-6 pm at MAR.1.04.

Today, we’ll bridge the gap between basic Python data structures and specialised data analysis libraries, exploring how NumPy and Pandas make data analysis more efficient and introducing powerful and professional tools for working with tabular data.

πŸ““ Interactive Lecture Format

During this lecture:

  1. I will share a Jupyter notebook that we’ll work through together
  2. The slides will serve as a reference guide for study later, not necessarily to follow along
  3. I hope you’ll be able to code along with me during the lecture
  4. Make sure you have access to Nuvolos

πŸ“‹ Preparation

Before the lecture

Complete the πŸ“ W04 Formative Exercise to get a feel for working with weather data in Python. In this lecture, I’ll show you how to do the same tasks much more efficiently using NumPy and Pandas!

πŸ’‘ Make sure you can access Nuvolos during the lecture

🎬 Lecture Material

βœ… View the model solutions to the πŸ“ W04 Formative Exercise that were demonstrated during the lecture.

Download the notebook used in the lecture:

Slides

These slides serve as a reference guide for study later. During the lecture, we’ll primarily work in a Jupyter notebook that I’ll share with you.

Download the slides directly as a PDF:

Or browse the slides directly from your browser (view fullscreen):

πŸ“₯ Post-Lecture Actions

  1. Review today’s slides and practice with NumPy and Pandas.
  2. Review the Jupyter notebook from today’s lecture
  3. Attend the πŸ’» W04 Lab for hands-on practice.
  4. Start thinking about how you’ll apply these concepts to your summative assessment.
  5. Use the #help channel on Slack if you need clarification or help.

⏭️ Next week: We’ll continue working with Pandas and prepare for your first summative assessment!

πŸ“š Additional Resources