Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

How Python represents data

In the first lesson, you focused on getting started: running Python code, working in notebooks, and understanding how code cells behave.

In this lesson, the focus shifts from how Python runs to how Python stores information.

At the heart of this lesson are variables.

A variable is more than just a name. It is a way to represent data, give it meaning, and make it usable for analysis.


1. Learning objectives

After this lesson, you will be able to:


2. From values to data

At first, variables store single values:

Very quickly, however, real-world problems require more than one value at a time.

Spatial data is a good example:

To handle this, Python provides multi-item variables, such as lists and dictionaries, which allow you to group related values and give structure to your data.


3. Why this matters for SDS

In spatial data science, almost everything is structured data:

The way you choose and organise variables determines:

This lesson introduces the building blocks you will reuse throughout the course.


4. Looking ahead

The data structures you learn here are essential for the next steps in the course.

In the following lessons, you will use them to:

If Lesson 1 was about getting started, Lesson 2 is about thinking in data.