class_docstr: Base class for loading datasets.
  
  Note that you should never instantiate the :class:`Dataset` class directly
  (same goes for its derived classes), but instead use one of the three
  available methods for loading datasets.
docstr: Load a dataset from a pandas dataframe.
  
  Use this if you want to use a custom dataset that is stored in a pandas
  dataframe. See the :ref:`User Guide<load_from_df_example>` for an
  example.
  
  Args:
      df(`Dataframe`): The dataframe containing the ratings. It must have
          three columns, corresponding to the user (raw) ids, the item
          (raw) ids, and the ratings, in this order.
      reader(:obj:`Reader <surprise.reader.Reader>`): A reader to read
          the file. Only the ``rating_scale`` field needs to be
          specified.
docstr_tok: ["Load","a","dataset","from","a","pandas","dataframe",".","Use","this","if","you","want","to","use","a","custom","dataset","that","is","stored","in","a","pandas","dataframe",".","See","the",":","ref",":","`","User","Guide","<","load_from_df_example",">","`","for","an","example",".","Args",":","df","(","`","Dataframe","`",")",":","The","dataframe","containing","the","ratings",".","It","must","have","three","columns",",","corresponding","to","the","user","(","raw",")","ids",",","the","item","(","raw",")","ids",",","and","the","ratings",",","in","this","order",".","reader","(",":","obj",":","`","Reader","<","surprise.reader.Reader",">","`",")",":","A","reader","to","read","the","file",".","Only","the","``","rating_scale","``","field","needs","to","be","specified","."]
code: def load_from_df(cls, df, reader):
      """Load a dataset from a pandas dataframe.
  
      Use this if you want to use a custom dataset that is stored in a pandas
      dataframe. See the :ref:`User Guide<load_from_df_example>` for an
      example.
  
      Args:
          df(`Dataframe`): The dataframe containing the ratings. It must have
              three columns, corresponding to the user (raw) ids, the item
              (raw) ids, and the ratings, in this order.
          reader(:obj:`Reader <surprise.reader.Reader>`): A reader to read
              the file. Only the ``rating_scale`` field needs to be
              specified.
      """
  
      return DatasetAutoFolds(reader=reader, df=df)
  
imports: import itertools
  import os
  import sys
  from collections import defaultdict
  from .builtin_datasets import BUILTIN_DATASETS, download_builtin_dataset
  from .reader import Reader
  from .trainset import Trainset
label_desc: Use image node_id 5 for calling the Dataset obj's underlying member method code with example usage: obj.load_from_df(cls, df, reader) and returns: DatasetAutoFolds