March 2019
Beginner to intermediate
464 pages
10h 57m
English
If you look closely at the data, you will notice that there are some records with no CustomerID. As we need to build a customer-item matrix where each row is specific to each customer, we cannot include those records with no CustomerID in our data. Let's first take a look at how many records do not have CustomerID.
Take a look at the following code:
df['CustomerID'].isna().sum()
The isna function that we are using here detects missing values and returns True for each missing value. By summing over these values, we can count the number of records with no CustomerID. The result looks as follows:

As you can ...
Read now
Unlock full access