Data Frame.From Objects Method
Definition
Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
From | Creates a new data frame containing the public properties of a sequence of objects. |
From | Creates a new data frame containing the specified properties of a sequence of objects. |
From | Creates a new data frame containing the public properties of a sequence of objects. |
From | Creates a new data frame containing the specified properties of a sequence of objects. |
FromObjects<T>(IEnumerable<T>)
Creates a new data frame containing the public properties of a sequence of objects.
public static DataFrame<long, string> FromObjects<T>(
IEnumerable<T> sequence
)
Parameters
- sequence IEnumerable<T>
- A sequence of objects of type T.
Type Parameters
- T
- The type of the objects.
Return Value
DataFrame<Int64, String>A data frame whose columns contain the values of the properties of the objects in sequence.
FromObjects<T>(IEnumerable<T>, String[])
Creates a new data frame containing the specified properties of a sequence of objects.
public static DataFrame<long, string> FromObjects<T>(
IEnumerable<T> sequence,
params string[] propertyNames
)
Parameters
- sequence IEnumerable<T>
- A sequence of objects of type T.
- propertyNames String[]
- A parameter array of strings that contains the names of the properties to include in the data frame.
Type Parameters
- T
- The type of the objects.
Return Value
DataFrame<Int64, String>A data frame whose columns contain the values of the properties specified by propertyNames of the objects in sequence.
FromObjects<T, R>(IEnumerable<T>, String)
Creates a new data frame containing the public properties of a sequence of objects.
public static DataFrame<R, string> FromObjects<T, R>(
IEnumerable<T> sequence,
string rowKeyProperty
)
Parameters
- sequence IEnumerable<T>
- A sequence of objects of type T.
- rowKeyProperty String
- The name of the property that contains the row keys.
Type Parameters
- T
- The type of the objects.
- R
- The type of the row index of the data frame.
Return Value
DataFrame<R, String>A data frame whose columns contain the values of the properties of the objects in sequence.
FromObjects<T, R>(IEnumerable<T>, String[])
Creates a new data frame containing the specified properties of a sequence of objects.
public static DataFrame<R, string> FromObjects<T, R>(
IEnumerable<T> sequence,
params string[] propertyNames
)
Parameters
- sequence IEnumerable<T>
- A sequence of objects of type T.
- propertyNames String[]
- A parameter array of strings that contains the names of the properties to include in the data frame. The first property will serve as the row index. It must be of type R.
Type Parameters
- T
- The type of the objects.
- R
- The type of the row index.
Return Value
DataFrame<R, String>A data frame whose columns contain the values of the properties specified by propertyNames of the objects in sequence.