CSVLoader

class squirro.lib.nlp.steps.loaders.CSVLoader(config)

Bases: squirro.lib.nlp.steps.loaders.Loader

CSV Loader, which loads csv files.

Parameters
  • type (str) – csv

  • delimiter (str, ',') – Delimiter between fields

  • encoding (str, 'utf-8') – File encoding

  • force_encoding (bool, True) – DEPRECATED. This will be removed in a future release

  • quotechar (str, '"') – Character used around values

  • replace_new_lines (bool, True) – Whether or not to replace new lines

Methods Summary

process(directory)

Process a directory of csv files and yield documents.

Methods Documentation

process(directory)

Process a directory of csv files and yield documents.

Parameters

directory (str) – path to directory with *.csv files

Returns

Generator of Documents read from CSV

Return type

generator(Document)