Pivoting your data
In this chapter, you will go one step further in generating personalized recommendations — you will find items that users, similar to the one you are making recommendations for, have liked.
The first step you will need to start with is formatting your data. You begin with a dataset containing users and their ratings as individual rows with the following columns:
user: User IDtitle: Title of the movierating: Rating the user gave the movie
You will need to transform the DataFrame into a user rating matrix where each row represents a user, and each column represents the movies on the platform. This will allow you to easily compare users and their preferences.
Este ejercicio forma parte del curso
Building Recommendation Engines in Python
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Inspect the first 5 rows of user_ratings
print(user_ratings.____)