OECSVFileConverter

Attention

This is a preliminary API and may be improved based on user feedback. It is currently available in C++ and Python.

class OECSVFileConverter

The OECSVFileConverter class extracts data from CSV and TSV files into OERecord. Custom data extraction based on delimiter type and OEField inclusion can be set up through the OECSVConversionOptions.

Constructors

OECSVFileConverter() -> OECSVFileConverter
OECSVFileConverter(arg2: OECSVFileConverter) -> OECSVFileConverter

Open

Open(path: str, displayName: str = str()) -> bool
Open(path: str, options: OECSVConversionOptions,
     displayName: str = str()) -> bool

Returns a boolean based on whether the file can be opened. OECSVConversionOptions is set at open.

Close

Close() -> None

Closes the stream.

GetNextRecord

GetNextRecord(record: OEMolRecord) -> int

Steps through each row of the file adding to the OEMolRecord passed into the function. The function returns constants based on each pass. Return codes: SaiphReturnCode::Success, SaiphReturnCode::Fail, SaiphReturnCode::EndOfFile

GetProgress

GetProgress() -> float

Returns the percentage of the file that has been traversed.