code: def csv(self, csv_file, dialect='excel', **fmt_params):
          
          if isinstance(csv_file, str):
              file_open = get_read_function(csv_file, self.disable_compression)
              input_file = file_open(csv_file)
          elif hasattr(csv_file, 'next') or hasattr(csv_file, '__next__'):
              input_file = csv_file
          else:
              raise ValueError('csv_file must be a file path or implement the iterator interface')
  
          csv_input = csvapi.reader(input_file, dialect=dialect, **fmt_params)
          return self(csv_input).cache(delete_lineage=True)
docs: Reads and parses the input of a csv stream or file.
  
          csv_file can be a filepath or an object that implements the iterator interface
          (defines next() or __next__() depending on python version).
  
          >>> seq.csv('examples/camping_purchases.csv').take(2)
          [['1', 'tent', '300'], ['2', 'food', '100']]
  
          :param csv_file: path to file or iterator object
          :param dialect: dialect of csv, passed to csv.reader
          :param fmt_params: options passed to csv.reader
          :return: Sequence wrapping csv file