 | DataFrameTabulate(String, String, String, FuncIDFColumn, Object) Method |
Tabulates the results of applying the given delegate to the values in the specified data
column for every combination of the two specified factors.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntaxpublic DataFrame Tabulate(
string factorAColName,
string factorBColName,
string dataColName,
Func<IDFColumn, Object> function
)
Public Function Tabulate (
factorAColName As String,
factorBColName As String,
dataColName As String,
function As Func(Of IDFColumn, Object)
) As DataFrame
public:
DataFrame^ Tabulate(
String^ factorAColName,
String^ factorBColName,
String^ dataColName,
Func<IDFColumn^, Object^>^ function
)
member Tabulate :
factorAColName : string *
factorBColName : string *
dataColName : string *
function : Func<IDFColumn, Object> -> DataFrame
Parameters
- factorAColName String
- The name of the column for the first grouping factor.
- factorBColName String
- The name of the column for the second grouping factor.
- dataColName String
- The name of the data column.
- function FuncIDFColumn, Object
-
A delegate that takes a data frame column and returns a generic object.
Return Value
DataFrame
A new data frame.
ExceptionsException | Condition |
---|
InvalidArgumentException |
Thrown if the given factor or data column names do not exist in this data frame.
|
Remarks
The returned data frame has row keys containing the sorted, unique levels of
the first grouping factor as strings. The columns in the data frame, all instances
of DFGenericColumn, are named using the sorted, unique levels of the second grouping
factor. Each cell in the data frame contains the results of applying the given
delegate to the values in the data column tabulated for the appropriate combination of
the two factors.
A final column is appended, named Overall, containing the overall results for each
level of the first factor. A final row is appended, with key Overall, containing
the overall results for each level of the second factor. The lower right corner cell, accessed
by this["Overall","Overall"], contains the results of applying the given delegate to all
values in the data column.
See Also