Skip to content

Week 2 — Description

The learning outcomes for this week are:

  • To load a data file into Pandas and describe its basic structural characteristics.
  • To identify the type of a variable and descriptive statistics appropriate to it.
  • To describe the distribution of a variable numerically and visually.
  • To describe how data was collected.
  • To reason about limitations of the collection of data.

We'll do this through several resources and activities:

This week's material uses chapters 5 and 10 of the textbook.

The videos are also available as a Panopto playlist.

Describing Data

This video introduces the week's topic: describing data and data sets. We discuss the pipeline by which phenomena become a data set.

What is a Dataset?

Read What is a Dataset? by Leigh Dodds. This article looks at how the term ‘data set’ is defined by different communities, and the common themes to these definitions.

This article does reference some concepts we haven't yet gotten to. For example, when they talk about whether the data has been labeled for a particular task, they are referring to labels we would use for a prediction or classification task, which we will discuss in a few weeks when we talk about regression and classification. Don't feel like you need to understand every concept in this article in your first read; understand what you can, and we'll return to it.

MovieLens Data

Download the MovieLens 25M Dataset. The Zip file is 250MB, and the files take about 1.2GB uncompressed.

You can use the smaller 20M or latest-small versions for practice if you want to play with a smaller version.

I will be using this dataset in the demo notebooks for this week.

MovieLens Paper

Harper, F. M. and Konstan, J. A. (2015) ‘The MovieLens Datasets: History and Context’, ACM Transactions on Interactive Intelligent Systems, 5(4), pp. 19:1–19:19. DOI 10.1145/2827872.

This paper is not an assigned reading — it is here for your information.

Pandas Basics

In this video, I introduce Pandas and the Pandas DataFrame data structure. We see how to load a CSV file and inspect the resulting data frame.


Variables and Types

In this video, we learn the different types of data (variables) that we will encounter.


Datasheets for Datasets

Read Datasheets for Datasets by Timnit Gebru et al.

Week 2 Quiz

Submit the Week 2 quiz by Monday night.

Textbook Chapters

This week's material uses chapters 5 and 10 of the textbook. We aren't getting to everything in those chapters though.

Groups and Aggregates

In this video, we discuss how compute aggregate statistics in Pandas.


Descriptive Statistics

In this video, we discuss descriptive statistics for numeric variables.

Describing Distributions

This video introdues the concept of distributions, and how we can see the shape and layout of our data.


Data Sources and Bias


Codings and Encodings

This video talks more about how data is encoded, and what we need to document about that.


Tutorial Notebooks

The tutorial notebooks contain more info on the Python code, including more systematic overviews of the different Python and Pandas features.

We will not get to all Pandas features you might need in videos. These notebooks, the textbook, and the Pandas User Guide all provide additional information on Pandas, NumPy, and SciPy.


In a few videos, I have used the Palmer Penguins data set.

  • Download data in CSV (provided under CC-0)
  • Look at the documentation and references in the source repository
  • Describe the distributions of the different variables numerically and graphically
  • See how many questions from Datasheets for Datasets you can find answers to in the penguin data documentation

For more practice, you can look at the paper for the MovieLens data and try to answer Datasheets questions for it too!

Assignment 1

Start working on Assignment 1. It is due at the end of Week 3.