-
Book Overview & Buying
-
Table Of Contents
Polars Cookbook
By :
The first thing you need to do is to understand what your data looks like. Understanding things such as the schema and basic statistics of your data helps you see the current state of your data. Only then will you be able to see what data operations you’d need to make your data clean and organized for analysis.
In this recipe, we’ll cover ways to return a few rows from the dataset, as well as learning how to generate summary statistics and check the column quality.
We’ll first read the data and start exploring the DataFrame:
df = pl.read_csv('../data/covid_19_deaths.csv')df.head(5)
The preceding code will return the following output:
Figure 3.1 – The first five rows of the DataFrame
df.tail(5)
The preceding code will return the following output:
Figure...