F# Data


CsvProvider

Typed representation of a CSV file.

Static parameters

Static parametersDescription
Sample
Signature: string (optional, default = "")

Location of a CSV sample file or a string containing a sample CSV document.

Separators
Signature: string (optional, default = "")

Column delimiter(s). Defaults to ,.

Culture
Signature: string (optional, default = "")

The culture used for parsing numbers and dates. Defaults to the invariant culture.

InferRows
Signature: int (optional, default = 1000)

Number of rows to use for inference. Defaults to 1000. If this is zero, all rows are used.

Schema
Signature: string (optional, default = "")

Optional column types, in a comma separated list. Valid types are int, int64, bool, float, decimal, date, guid, string, int?, int64?, bool?, float?, decimal?, date?, guid?, int option, int64 option, bool option, float option, decimal option, date option, guid option and string option. You can also specify a unit and the name of the column like this: Name (type<unit>), or you can override only the name. If you don't want to specify all the columns, you can reference the columns by name like this: ColumnName=type.

HasHeaders
Signature: bool (optional, default = true)

Whether the sample contains the names of the columns as its first line.

IgnoreErrors
Signature: bool (optional, default = false)

Whether to ignore rows that have the wrong number of columns or which can't be parsed using the inferred or specified schema. Otherwise an exception is thrown when these rows are encountered.

AssumeMissingValues
Signature: bool (optional, default = false)

When set to true, the type provider will assume all columns can have missing values, even if in the provided sample all values are present. Defaults to false.

PreferOptionals
Signature: bool (optional, default = false)

When set to true, inference will prefer to use the option type instead of nullable types, double.NaN or "" for missing values. Defaults to false.

Quote
Signature: char (optional, default = '"')

The quotation mark (for surrounding values containing the delimiter). Defaults to ".

MissingValues
Signature: string (optional, default = "")

The set of strings recogized as missing values. Defaults to NaN,NA,#N/A,:,-.

CacheRows
Signature: bool (optional, default = true)

Whether the rows should be caches so they can be iterated multiple times. Defaults to true. Disable for large datasets.

ResolutionFolder
Signature: string (optional, default = "")

A directory that is used when resolving relative file references (at design time and in hosted execution).

Fork me on GitHub