Loading video player…

NumPy Techniques and Practical Examples (Overview)

The NumPy library is a Python library used for scientific computing. It provides you with a multidimensional array object for storing and analyzing data in a wide variety of ways. In this video course, you’ll see examples of some features NumPy provides that aren’t always highlighted in other tutorials.

In this video course, you’ll learn how to:

  • Create multidimensional arrays from data stored in files
  • Identify and remove duplicate data from a NumPy array
  • Use structured NumPy arrays to reconcile the differences between datasets
  • Analyze and chart specific parts of hierarchical data
  • Create vectorized versions of your own functions
Download

Sample Code (.zip)

608.6 KB
Download

Course Slides (.pdf)

1.3 MB

00:00 Welcome to NumPy Techniques and Practical Examples. My name is Christopher, and I will be your guide. This course is all about NumPy, and shows you four real-world examples of how you might use it and things you can accomplish with it.

00:13 If you’ve never done NumPy before, it might be better to take an intro course first. I will walk you through all the functions I use in case any of them are new to you.

00:23 Along the way, you’ll learn how to create multidimensional arrays in NumPy, how to load CSV data into an array, how to create an array of given shape, but filled with zeros, how to create a new array based on an old one, but with a change and pretend that you’re modifying it, how to add structural information to arrays, and how to use that to join row information between two existing arrays.

00:47 You’ll also see a quick intro on creating a bar graph from NumPy data. And finally, how to perform vector operations on NumPy columns, including how to write your own custom vectorized function.

01:00 This course was tested using Python 3.13, NumPy 2.2.1, Matplotlib 3.10.0, and I very briefly use version 8.4.0 of the natsort library.

01:13 This course presents four practical examples using NumPy. Those examples are: creating a multidimensional array where each dimension is populated from a separate CSV file, using structured arrays and how to run an SQL-like join operation, known as reconciliation, building a bar chart in Matplotlib with NumPy data, and finally, running vector operations on columns of NumPy data, including writing your own custom vectorized function.

01:43 Next up, I’ll dive in and get started by showing you how to create a multidimensional array in NumPy.

Become a Member to join the conversation.