Data Management HEC Liège — ECON2206

Module 2: Basic Python

Resources

Organisation

In class: 15 min lecture + 25 minutes exercises + 5 minutes review:

  • Hour 1: concepts 1, 2, 3
  • Hour 2: concepts 4, 5

Concepts

  1. Assignment and scalar types
  2. Strings
  3. Lists, tuples and sets
  4. Dictionaries
  5. Tracebacks
  6. Introduction to Pixi & executing .py files from the shell
  7. Executing .py files in VS Code
  8. Executing notebooks in VS Code

Learning objectives

After this lesson, you should be able to:

Assignment and scalar types

  • List several built-in scalar types in Python
  • Assign and manipulate scalar variables in Python
  • Convert variables between different types

Dictionaries

  • Assign flat and nested dictionaries in Python
  • Access elements in flat and nested dictionaries
  • Update or insert elements in dictionaries
  • Explain some benefits of labeled data structures

Tracebacks

  • Read and interpret tracebacks
  • Identify common errors in Python code
  • Use tracebacks to debug code

Back to Data Management