Skip to content

ICSVOptions

Type interface

Defines options for CSV format parser

Sources

ICSVOptions is an interface: it describes a shape of data and is not imported on its own.

Inheritance

ICSVOptions extends IDataParserOptions.

ICSVOptions is not extended by any other symbol.

Properties

dateFields

Type string[]

A list of fields that hold date/time infromation.

Parser will try to convert such fields into Date objects.

dateFormatter

Type DateFormatter

A date formatted to be used when parsing dates.

delimiter

Type stringDefault ','

A delimiter character for columns.

numberFields

Type string[]

A list of fields that should be treaded as numeric.

Any information container in such fields will be converted to number.

reverse

Type booleanDefault false

The data is in reverse order.

If iset to true, parser will invert the order of the data items before passing back the data.

skipEmpty

Type booleanDefault true

Skip empty rows.

If set to false, parser will generate empty data points for empty rows in data.

skipRows

Type numberDefault 0

Skip a number of rows from the beginning of the data.

Useful if your data contains non-data headers, such as column names or empty rows.

useColumnNames

Type booleanDefault false

Use the first row in data to generte column names.

Normally, parser will name each column col0, col1, etc.

Setting this to true will make the parser look at the first row, for actual column names.

Please note that if you use it with skipRows, the specified number of rows will be removed, then the parser will look for column names in the first row of what's left.

2 inherited items
dateFormat

Type stringInherited from IDataParserOptions

Override date format set in dateFormatter.

More info: Formatting Date & Time: parsing dates Tutorial on date parsing

emptyAs

Type anyInherited from IDataParserOptions

Empty values (e.g. empty strings, null, etc.) will be replaced with this.