Lesson overview

In this lesson we will continue to develop our data analysis skills and also learn a bit about debugging our scripts and interpreting errors.

This year we’re teaching these concepts using your choice of two different Python module options: Pandas and NumPy. Pandas is a modern and feature rich data analysis framework for Python that is designed to make data analysis and manipulation straightforward and powerful using easy-to-use data structures and operations. NumPy is designed for efficient numerical computing in Python.

We recommend that students continuing on to the Automating GIS processes course follow the lessons using Pandas below.

Those continuing on in the Introduction to Quantitative Geology course should follow the NumPy lessons.

In the second half of the lesson we will focus on debugging. Many new programmers struggle with removing problems in their code (debugging) because they start randomly making changes without a clear picture of what is wrong or even what the code should do! By learning a few basic ideas about debugging and interpreting error messages, we hope to save you time and frustration as your scripts become more complex.

  1. Interpreting error messages
  2. Debugging your scripts
  3. Exercise 6: Data analysis II

Learning goals

After this weeks lesson your should be able to:

  • Analyze data in Python using different functions of Pandas/NumPy
  • Understand common Python errors
  • Follow a simple set of guidelines to debug programs efficiently

Lesson videos

Lesson 6.1 - Advanced data processing

Dave Whipp & Henrikki Tenkanen, University of Helsinki @ Geo-Python channel on Youtube.

Dave Whipp & Henrikki Tenkanen, University of Helsinki @ Geo-Python channel on Youtube.

Dave Whipp & Henrikki Tenkanen, University of Helsinki @ Geo-Python channel on Youtube.

Lesson 6.2 - Errors, and Debugging

Dave Whipp & Henrikki Tenkanen, University of Helsinki @ Geo-Python channel on Youtube.

Lesson 6 - Exercise 6 preview (NumPy version)

Dave Whipp & Henrikki Tenkanen, University of Helsinki @ Geo-Python channel on Youtube.