The MovieLens Dataset

1 Like

For Pytorch users, simply modify the imported packages as follows:

import os
import pandas as pd
import torch
from torch.utils import data
from d2l import torch as d2l

By the way, the code related to pd.read_csv() should be modified to address the following warning
FutureWarning: In a future version of pandas all arguments of read_csv except for the argument 'filepath_or_buffer' will be keyword-only.

data = pd.read_csv(os.path.join(data_dir, ''), sep='\t', names=names, engine='python')