FSharp.Data


CsvProvider Type

Namespace: FSharp.Data

Assembly: FSharp.Data.dll

This is a provided type definition

Typed representation of a CSV file.

Static parameters

Static parameters Description

AssumeMissingValues: bool(optional,default=false)

Full Usage: AssumeMissingValues: 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.

CacheRows: bool(optional,default=true)

Full Usage: CacheRows: bool(optional,default=true)

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

Culture: string(optional,default="")

Full Usage: Culture: string(optional,default="")

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

EmbeddedResource: string(optional,default="")

Full Usage: EmbeddedResource: string(optional,default="")

When specified, the type provider first attempts to load the sample from the specified resource (e.g. 'MyCompany.MyAssembly, resource_name.csv'). This is useful when exposing types generated by the type provider.

Encoding: string(optional,default="")

Full Usage: Encoding: string(optional,default="")

The encoding used to read the sample. You can specify either the character set name or the codepage number. Defaults to UTF8 for files, and to ISO-8859-1 the for HTTP requests, unless charset is specified in the Content-Type response header.

HasHeaders: bool(optional,default=true)

Full Usage: HasHeaders: bool(optional,default=true)

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

IgnoreErrors: bool(optional,default=false)

Full Usage: IgnoreErrors: 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.

InferRows: int(optional,default=1000)

Full Usage: InferRows: int(optional,default=1000)

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

MissingValues: string(optional,default="")

Full Usage: MissingValues: string(optional,default="")

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

PreferOptionals: bool(optional,default=false)

Full Usage: PreferOptionals: 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: char(optional,default='"')

Full Usage: Quote: char(optional,default='"')

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

ResolutionFolder: string(optional,default="")

Full Usage: ResolutionFolder: string(optional,default="")

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

Sample: string(optional,default="")

Full Usage: Sample: string(optional,default="")

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

Schema: string(optional,default="")

Full Usage: Schema: 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), 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.

Separators: string(optional,default="")

Full Usage: Separators: string(optional,default="")

Column delimiter(s). Defaults to ,.

SkipRows: int(optional,default=0)

Full Usage: SkipRows: int(optional,default=0)

Skips the first n rows of the CSV file.