code: def iterrows(lines_or_file, namedtuples=False, dicts=False, encoding='utf-8', **kw):
      
      if namedtuples and dicts:
          raise ValueError('either namedtuples or dicts can be chosen as output format')
      elif namedtuples:
          _reader = NamedTupleReader
      elif dicts:
          _reader = UnicodeDictReader
      else:
          _reader = UnicodeReader
  
      with _reader(lines_or_file, encoding=encoding, **fix_kw(kw)) as r:
          for item in r:
              yield item
docs: Convenience factory function for csv reader.
  
      :param lines_or_file: Content to be read. Either a file handle, a file path or a list\
      of strings.
      :param namedtuples: Yield namedtuples.
      :param dicts: Yield dicts.
      :param encoding: Encoding of the content.
      :param kw: Keyword parameters are passed through to csv.reader.
      :return: A generator over the rows.