Skip to main content
FieldLabeledCSVReader is a reader class that converts CSV rows into field-labeled text documents.
ParameterTypeDefaultDescription
fileUnion[Path, IO[Any]]RequiredPath to CSV file or file-like object
chunk_titleOptional[Union[str, List[str]]]NoneTitle to add at the top of each entry. Can be a single string or a list that rotates through entries
field_namesOptional[List[str]][]Custom labels for CSV fields. If not provided, column headers are used
format_headersboolTrueWhether to format column headers by replacing underscores with spaces and applying title case
skip_empty_fieldsboolTrueWhether to skip fields with empty values in the output
delimiterstr","Character used to separate fields in the CSV
quotecharstr'"'Character used to quote fields in the CSV
encodingOptional[str]"utf-8"Character encoding for reading the file
I