In this section, we will explore the MovieLens dataset and also prepare the data required for building collaborative filtering recommendation engines using python.
Let's see the distribution of ratings using the following code snippet:
import matplotlib.pyplot as plt plt.hist(df['Rating'])
From the following image we see that we have more movies with 4 star ratings:
Using the following code snippet, we shall see the counts of ratings by applying the
groupby() function and the
count() function on DataFrame:
The following code snippet shows ...