class_docstr: Code for reading current MovieLens data sets, including ML-20M, ML-Latest, and
  ML-Latest-Small.
  
  Parameters:
      path(str or pathlib.Path): Path to the directory containing the data set.
class_docstr_tok: ["Code","for","reading","current","MovieLens","data","sets",",","including","ML-20M",",","ML-Latest",",","and","ML-Latest-Small",".","Parameters",":","path","(","str","or","pathlib.Path",")",":","Path","to","the","directory","containing","the","data","set","."]
docstr: The movie link table, connecting movie IDs to external identifiers.  It is indexed
  by movie ID.
  
  >>> mlsmall = MovieLens('data/ml-latest-small')
  >>> mlsmall.links
           imdbId  tmdbId
  item
  1        114709     862
  2        113497    8844
  3        113228   15602
  4        114885   31357
  5        113041   11862
  ...
  [9125 rows x 2 columns]
docstr_tok: ["The","movie","link","table",",","connecting","movie","IDs","to","external","identifiers",".","It","is","indexed","by","movie","ID",".",">",">",">","mlsmall","=","MovieLens","(","'data\/ml-latest-small","'",")",">",">",">","mlsmall.links","imdbId","tmdbId","item","1","114709","862","2","113497","8844","3","113228","15602","4","114885","31357","5","113041","11862","...","[","9125","rows","x","2","columns","]"]
code: def links(self):
      """
      The movie link table, connecting movie IDs to external identifiers.  It is indexed
      by movie ID.
  
      >>> mlsmall = MovieLens('data/ml-latest-small')
      >>> mlsmall.links
               imdbId  tmdbId
      item
      1        114709     862
      2        113497    8844
      3        113228   15602
      4        114885   31357
      5        113041   11862
      ...
      [9125 rows x 2 columns]
      """
  
      fn = self.path / "links.csv"
      links = pd.read_csv(
          fn,
          dtype={
              "movieId": np.int32,
              "imdbId": np.int64,
              "tmdbId": pd.Int64Dtype(),
          },
      )
      links.rename(columns={"movieId": "item"}, inplace=True)
      links.set_index("item", inplace=True)
      _log.debug(
          "loaded %s, takes %d bytes", fn, links.memory_usage().sum()
      )
      return links
  
imports: import os.path
  from pathlib import Path
  import logging
  import pandas
  import numpy
  from lenskit.util import cached
label_desc: Use image node_id 4 for calling the MovieLens obj's underlying member method code with example usage: obj.links() and returns: links