Setting Up
00:00 Before you can sink your teeth into some Polars code and into some data, you will need to install Polars and download the data that you will be using. So go ahead and start by opening your terminal and after opening your terminal, navigate to a folder where you’ll set up everything. For me, that’s this polars-missing-data directory.
00:24
Go ahead and create a virtual environment. Use your preferred tool if you have one. Otherwise, you can use the Python module venv
from the standard library.
00:34
You’ll run python3 -m venv
, and then the name of the virtual environment directory. I just like to use venv
. Run that, give it a second, and then run the command source
00:50
.venv/bin/activate
to activate the virtual environment. Once you’re in, either by using this method or by using your preferred tool to manage virtual environments, you will want to install Polars.
01:04
If you’re using these standard tools, use python3 -m pip install polars
, and then go ahead and install Jupyter as well. Because you will want to use a Jupyter Notebook to go through this video course.
01:19 Give it a second. It might take a little bit longer than what it’s taking now because in my case, I already have these packages cached.
01:28 And then just to make sure everything is working smoothly, go ahead and open your terminal. Try to import Polars,
01:39
and then run polars.show_versions()
.
01:44 You will see a long list of optional dependencies that are not installed, and that is okay. And if you scroll to the top, you should see the main version info regarding Polars.
01:59 You will want to make sure you are at least running Polars 1.0. At the time of this recording, the latest version is Polars 1.26, but if you’re running on a later version, what’s shown here will probably still apply because it’s part of a very stable API that Polars is very unlikely to change.
02:22 Make sure this works, and once you’ve done this, you will want to download the complementary data. There should be a big download button under the video.
02:32 So go ahead, download your data and move it to this directory.
02:38
So in this case, I downloaded the data into the polars-missing-data directory. You can see the directive materials is in here. And if you go ahead and you list the files in there, you will find a file tips.parquet
.
02:56 This is the file with the data that you will be using, and it contains information about restaurant orders. And you will have an extra folder with a set of notebooks that will be useful for you to go back and work through the code snippets that we’re going to explore.
03:15 And once you’re ready, we can move on and I’ll teach you how to identify missing data.
Become a Member to join the conversation.