DataExtensions.ReadDataFrame<R>(IDataReader, String, IEnumerable<String>, Int32, Boolean) Method

Reads the specified columns from a data reader and returns them as a data frame using the specified column as row keys.

Definition

Namespace: Extreme.Data
Assembly: Extreme.Data (in Extreme.Data.dll) Version: 3.2.0
C#
public static DataFrame<R, string> ReadDataFrame<R>(
	this IDataReader reader,
	string keyColumn,
	IEnumerable<string> columnKeys,
	int capacity = 1000,
	bool dropKeyColumn = true
)

Parameters

reader  IDataReader
An IDataReader.
keyColumn  String
The name of the column that contains the row index values.
columnKeys  IEnumerable<String>
A sequence of column names.
capacity  Int32  (Optional)
Optional. The initial capacity for the data frame.
dropKeyColumn  Boolean  (Optional)
Optional. Specifies whether the key column should be removed from the data frame. The default is true.

Type Parameters

R
The element type of the row index.

Return Value

DataFrame<R, String>
The data frame with the columns specified by columnKeys read from reader.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDataReader. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

Optimal performance is achieved when capacity is equal to the number of rows in the data frame.

See Also