class_docstr: DataFile class for NCF. Iterator to read data from a csv file.
  Data must be sorted by user. Includes utilities for loading user data from
  file, formatting it and returning a Pandas dataframe.
class_docstr_tok: ["DataFile","class","for","NCF",".","Iterator","to","read","data","from","a","csv","file",".","Data","must","be","sorted","by","user",".","Includes","utilities","for","loading","user","data","from","file",",","formatting","it","and","returning","a","Pandas","dataframe","."]
code: def __next__(self):
      if self.next_row:
          self.row = self.next_row
      elif self.line_num == 0:
          self.row = self._extract_row_data(next(self.reader, None))
          if self.row is None:
              raise EmptyFileException(
                  "{} is empty.".format(self.filename)
              )
      else:
          raise StopIteration  # end of file
      self.next_row = self._extract_row_data(next(self.reader, None))
      self.line_num += 1
  
      return self.row
  
imports: import os
  from collections import OrderedDict
  import random
  import numpy
  import pandas
  import csv
  import logging
  from tqdm import tqdm
  from recommenders.utils.constants import DEFAULT_ITEM_COL, DEFAULT_USER_COL, DEFAULT_RATING_COL
label_desc: Use image node_id 8 for calling the DataFile obj's underlying member method code with example usage: obj.__next__() and returns: self