Reads the specified columns from a data reader and returns them
as a data frame using the specified column as row keys.
Namespace:
Extreme.Data
Assembly:
Extreme.Data (in Extreme.Data.dll) Version: 3.1.0
public static DataFrame<R, string> ReadDataFrame<R>(
this IDataReader reader,
string keyColumn,
IEnumerable<string> columnKeys,
int capacity = 1000,
bool dropKeyColumn = true
)
<ExtensionAttribute>
Public Shared Function ReadDataFrame(Of R) (
reader As IDataReader,
keyColumn As String,
columnKeys As IEnumerable(Of String),
Optional capacity As Integer = 1000,
Optional dropKeyColumn As Boolean = true
) As DataFrame(Of R, String)
public:
[ExtensionAttribute]
generic<typename R>
static DataFrame<R, String^>^ ReadDataFrame(
IDataReader^ reader,
String^ keyColumn,
IEnumerable<String^>^ columnKeys,
int capacity = 1000,
bool dropKeyColumn = true
)
[<ExtensionAttribute>]
static member ReadDataFrame :
reader : IDataReader *
keyColumn : string *
columnKeys : IEnumerable<string> *
?capacity : int *
?dropKeyColumn : bool
(* Defaults:
let _capacity = defaultArg capacity 1000
let _dropKeyColumn = defaultArg dropKeyColumn true
*)
-> DataFrame<'R, string>
Parameters
- reader
- Type: System.DataIDataReader
An IDataReader. - keyColumn
- Type: SystemString
The name of the column that contains the row index values. - columnKeys
- Type: System.Collections.GenericIEnumerableString
A sequence of column names. - capacity (Optional)
- Type: SystemInt32
Optional. The initial capacity for the data frame. - dropKeyColumn (Optional)
- Type: SystemBoolean
Optional. Specifies whether the key column
should be removed from the data frame. The default is .
Type Parameters
- R
- The element type of the row index.
Return Value
Type:
DataFrameR,
StringThe 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).
Optimal performance is achieved when capacity
is equal to the number of rows in the data frame.
Reference