DataFrame<R, C>.Pivot Method

Definition

Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Pivot<R1, C1, T>(C, C, C) Constructs a new data frame using the specified columns as row and column indexes.
Pivot<R1, C1, T>(C, C, C, AggregatorGroup<T>) Constructs a new data frame using the specified columns as row and column indexes and aggregates the values corresponding to each row-column pair.

DataFrame<R, C>.Pivot<R1, C1, T>(C, C, C)

Constructs a new data frame using the specified columns as row and column indexes.
C#
public DataFrame<R1, C1> Pivot<R1, C1, T>(
	C rows,
	C columns,
	C values
)

Parameters

rows  C
The key of the column that contains the row indexes.
columns  C
The key of the column that contains the column indexes.
values  C
The key of the column that contains the values.

Type Parameters

R1
The element type of the column that contains the row indexes.
C1
The element type of the column that contains the column indexes.
T
The element type of the column that contains the values.

Return Value

DataFrame<R1, C1>
A new data frame with rows indexed by the unique values in column rows, columns indexed by the unique values in column columns, and values the corresponding value in values.

DataFrame<R, C>.Pivot<R1, C1, T>(C, C, C, AggregatorGroup<T>)

Constructs a new data frame using the specified columns as row and column indexes and aggregates the values corresponding to each row-column pair.
C#
public DataFrame<R1, C1> Pivot<R1, C1, T>(
	C rows,
	C columns,
	C values,
	AggregatorGroup<T> aggregator
)

Parameters

rows  C
The key of the column that contains the row indexes.
columns  C
The key of the column that contains the column indexes.
values  C
The key of the column that contains the values.
aggregator  AggregatorGroup<T>
An aggregator to apply to each group.

Type Parameters

R1
The element type of the column that contains the row indexes.
C1
The element type of the column that contains the column indexes.
T
The element type of the column that contains the values.

Return Value

DataFrame<R1, C1>
A new data frame with rows indexed by the unique values in the column with key rows, columns indexed by the unique values in the column with key columns, and values the result of aggregating the values in the column with key values grouped by the keys in these columns using aggregator.

Exceptions

KeyNotFoundException

The value rows could not be found in the data frame's column index.

-or-

The value columns could not be found in the data frame's column index.

-or-

The value values could not be found in the data frame's column index.

InvalidCastException

The column with key rows could not be cast to type R1.

-or-

The column with key columns could not be cast to type C1.

See Also