__init__ constructor

init

Initializes a new data source with data from a CSV file using default parsing options.

def __init__(self, csv_path):
    ...
Parameter Type Description
csv_path str The path to the CSV file to be used as the data source.

init

Initializes a new data source with data from a CSV file using the specified options for parsing CSV data.

def __init__(self, csv_path, options):
    ...
Parameter Type Description
csv_path str The path to the CSV file to be used as the data source.
options CsvDataLoadOptions Options for parsing the CSV data.

Example

from groupdocs.assembly.data import CsvDataSource, CsvDataLoadOptions

persons = CsvDataSource("persons.csv", CsvDataLoadOptions(True))

init

Initializes a new data source with data from a CSV stream using default parsing options.

def __init__(self, csv_stream):
    ...
Parameter Type Description
csv_stream io.RawIOBase The stream of CSV data to be used as the data source.

init

Initializes a new data source with data from a CSV stream using the specified options for parsing CSV data.

def __init__(self, csv_stream, options):
    ...
Parameter Type Description
csv_stream io.RawIOBase The stream of CSV data to be used as the data source.
options CsvDataLoadOptions Options for parsing the CSV data.

See Also