Menu

Loading the Dataset

Loading the Dataset

Once the dataset files are available, the next step is to load them into pandas DataFrames. Pandas is used because it provides powerful tools for handling structured data, making it easier to clean, analyze, and manipulate datasets.

At this stage, we are not performing any transformations. The goal is simply to bring the data into Python and verify that it loads correctly.

Code:

import pandas as pd

movies = pd.read_csv("/content/movies.csv")

ratings = pd.read_csv("/content/ratings.csv")

The movies DataFrame contains movie-level information such as movie ID, title, and genres. The ratings DataFrame contains user-level information, including which user rated which movie and the rating value. These two datasets together form the backbone of the recommendation system.