Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Working With Missing Data in Polars (Summary)

In this video course, you’ve learned various techniques for working with missing data in Polars.

You also learned that while there are a range of ways for dealing with null values, the best way is to avoid them in the first place. In other words, see if you can find out what caused them and take steps to prevent this from happening in the future. You should also see if you can figure out what’s missing and try to recover it.

Here are additional resources to continue learning Polars:

Download

Course Slides (.pdf)

2.7 MB

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Already a member? Sign-In

00:00 Congratulations on making it this far as a quick summary. In this video course, you’ve learned how to identify missing values with expressions such as .is_null and .count_null.

00:12 You’ve learned how to fill those missing values with .fill_null in three different ways, and you’ve learned how to ignore those missing values either automatically because Polars does so in some operations, or by dropping the relevant columns with .drop_nulls() or by using some custom criteria and the context filter.

00:30 On top of that, you’ve also understood that Polars treats null values, the representation of missing data, very differently from the special value NaN, which has a dedicated API that you can use when working with NaN values.

00:47 So you’ve learned all of this, and as a next step, you might want to look at the Polars user guides on missing data. So if you look up the Polars documentation, you will see a menu that contains a section on expressions, and the section on expressions will contain a subsection on missing data that will go through the things you’ve learned in this video course, and some other things.

01:13 So this will be an excellent read if you want to learn even more about missing data. And additionally, not only do you have the user guide from the Polars documentation,

01:26 you also have these other Real Python resources. In this case, two articles where you can learn more about Polars and working with missing data in Polars.

01:35 The first one is an article that teaches you how to work with missing data, similarly to what we’ve done here, but it also contains some exercises and some other techniques.

01:45 And if you want to get up to speed with Polars itself, there’s also this second tutorial, Python Polars: A Lightning-Fast DataFrame Library, that teaches you more about Polars in general.

01:57 The course resources will also contain the notebooks you’ve been working on, and it’ll contain the code snippets in the eager and lazy APIs because you will want to use the lazy API typically in your workflows, and therefore the notebooks provided will also contain the code examples written in the lazy API.

02:20 Without further ado, thank you very much for your attention. Thank you so much for watching, and I hope to see you soon.

Become a Member to join the conversation.