code: def load_csv(path, delimiter=','):
      
      try:
          with open(path, 'rb') as csvfile:
              reader = DictReader(csvfile, delimiter=delimiter)
              for row in reader:
                  yield row
      except (OSError, IOError):
          raise ClientException("File not found: {}".format(path))
docs: Load CSV file from path and yield CSV rows
  
      Usage:
  
      for row in load_csv('/path/to/file'):
          print(row)
      or
      list(load_csv('/path/to/file'))
  
      :param path: file path
      :param delimiter: CSV delimiter
      :return: a generator where __next__ is a row of the CSV