Click or drag to resize
FrameReadCsv Method (Stream, NullableBoolean, NullableBoolean, NullableInt32, String, String, String, NullableInt32, String)
Load data frame from a CSV file. The operation automatically reads column names from the CSV file (if they are present) and infers the type of values for each column. Columns of primitive types (`int`, `float`, etc.) are converted to the right type. Columns of other types (such as dates) are not converted automatically. ## Parameters * `stream` - Specifies the input stream, opened at the beginning of CSV data * `hasHeaders` - Specifies whether the input CSV file has header row (when not set, the default value is `true`) * `inferTypes` - Specifies whether the method should attempt to infer types of columns automatically (set this to `false` if you want to specify schema) * `inferRows` - If `inferTypes=true`, this parameter specifies the number of rows to use for type inference. The default value is 100. * `schema` - A string that specifies CSV schema. See the documentation for information about the schema format. * `separators` - A string that specifies one or more (single character) separators that are used to separate columns in the CSV file. Use for example `";"` to parse semicolon separated files. * `culture` - Specifies the name of the culture that is used when parsing values in the CSV file (such as `"en-US"`). The default is invariant culture. * `maxRows` - The maximal number of rows that should be read from the CSV file. * `missingValues` - An array of strings that contains values which should be treated as missing when reading the file. The default value is: "NaN"; "NA"; "#N/A"; ":"; "-"; "TBA"; "TBD". [category:Input and output]

Namespace:  Deedle
Assembly:  Deedle (in Deedle.dll) Version: 1.2
Syntax
C#
public static Frame<int, string> ReadCsv(
	Stream stream,
	[OptionalAttribute] Nullable<bool> hasHeaders,
	[OptionalAttribute] Nullable<bool> inferTypes,
	[OptionalAttribute] Nullable<int> inferRows,
	[OptionalAttribute] string schema,
	[OptionalAttribute] string separators,
	[OptionalAttribute] string culture,
	[OptionalAttribute] Nullable<int> maxRows,
	[OptionalAttribute] string[] missingValues
)

Parameters

stream
Type: System.IOStream

[Missing <param name="stream"/> documentation for "M:Deedle.Frame.ReadCsv(System.IO.Stream,System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Int32},System.String,System.String,System.String,System.Nullable{System.Int32},System.String[])"]

hasHeaders (Optional)
Type: SystemNullableBoolean

[Missing <param name="hasHeaders"/> documentation for "M:Deedle.Frame.ReadCsv(System.IO.Stream,System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Int32},System.String,System.String,System.String,System.Nullable{System.Int32},System.String[])"]

inferTypes (Optional)
Type: SystemNullableBoolean

[Missing <param name="inferTypes"/> documentation for "M:Deedle.Frame.ReadCsv(System.IO.Stream,System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Int32},System.String,System.String,System.String,System.Nullable{System.Int32},System.String[])"]

inferRows (Optional)
Type: SystemNullableInt32

[Missing <param name="inferRows"/> documentation for "M:Deedle.Frame.ReadCsv(System.IO.Stream,System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Int32},System.String,System.String,System.String,System.Nullable{System.Int32},System.String[])"]

schema (Optional)
Type: SystemString

[Missing <param name="schema"/> documentation for "M:Deedle.Frame.ReadCsv(System.IO.Stream,System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Int32},System.String,System.String,System.String,System.Nullable{System.Int32},System.String[])"]

separators (Optional)
Type: SystemString

[Missing <param name="separators"/> documentation for "M:Deedle.Frame.ReadCsv(System.IO.Stream,System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Int32},System.String,System.String,System.String,System.Nullable{System.Int32},System.String[])"]

culture (Optional)
Type: SystemString

[Missing <param name="culture"/> documentation for "M:Deedle.Frame.ReadCsv(System.IO.Stream,System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Int32},System.String,System.String,System.String,System.Nullable{System.Int32},System.String[])"]

maxRows (Optional)
Type: SystemNullableInt32

[Missing <param name="maxRows"/> documentation for "M:Deedle.Frame.ReadCsv(System.IO.Stream,System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Int32},System.String,System.String,System.String,System.Nullable{System.Int32},System.String[])"]

missingValues (Optional)
Type: SystemString

[Missing <param name="missingValues"/> documentation for "M:Deedle.Frame.ReadCsv(System.IO.Stream,System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Int32},System.String,System.String,System.String,System.Nullable{System.Int32},System.String[])"]

Return Value

Type: FrameInt32, String

[Missing <returns> documentation for "M:Deedle.Frame.ReadCsv(System.IO.Stream,System.Nullable{System.Boolean},System.Nullable{System.Boolean},System.Nullable{System.Int32},System.String,System.String,System.String,System.Nullable{System.Int32},System.String[])"]

See Also