Extreme Optimization™: Complexity made simple.

Math and Statistics
Libraries for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Blog
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Partners
    • Contact us
Introduction
Deployment Guide
Nuget packages
Configuration
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Data Analysis Library User's GuideData Analysis Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand Data Access Library User's GuideData Access Library User's Guide
Expand ReferenceReference
  • Extreme Optimization
    • Features
    • Solutions
    • Documentation
    • QuickStart Samples
    • Sample Applications
    • Downloads
    • Technical Support
    • Download trial
    • How to buy
    • Blog
    • Company
    • Resources
  • Documentation
    • Introduction
    • Deployment Guide
    • Nuget packages
    • Configuration
    • Using Parallelism
    • Mathematics Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Data Access Library User's Guide
    • Reference
  • Reference
    • Extreme
    • Extreme.Collections
    • Extreme.Data
    • Extreme.Data.Json
    • Extreme.Data.Matlab
    • Extreme.Data.R
    • Extreme.Data.Stata
    • Extreme.Data.Text
    • Extreme.DataAnalysis
    • Extreme.DataAnalysis.Linq
    • Extreme.DataAnalysis.Models
    • Extreme.Mathematics
    • Extreme.Mathematics.Algorithms
    • Extreme.Mathematics.Calculus
    • Extreme.Mathematics.Calculus.OrdinaryDifferentialEquations
    • Extreme.Mathematics.Curves
    • Extreme.Mathematics.Curves.Nonlinear
    • Extreme.Mathematics.Distributed
    • Extreme.Mathematics.EquationSolvers
    • Extreme.Mathematics.Generic
    • Extreme.Mathematics.LinearAlgebra
    • Extreme.Mathematics.LinearAlgebra.Implementation
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers.Preconditioners
    • Extreme.Mathematics.Optimization
    • Extreme.Mathematics.Optimization.LineSearches
    • Extreme.Mathematics.Random
    • Extreme.Mathematics.SignalProcessing
    • Extreme.Providers
    • Extreme.Providers.InteropServices
    • Extreme.Statistics
    • Extreme.Statistics.Distributions
    • Extreme.Statistics.Multivariate
    • Extreme.Statistics.Tests
    • Extreme.Statistics.TimeSeriesAnalysis
  • Extreme.DataAnalysis
    • Accumulator(T, U) Class
    • Aggregator(T, U) Class
    • Aggregator2(T, U) Class
    • Aggregator2Group Class
    • Aggregator2Group(T) Class
    • AggregatorGroup Class
    • AggregatorGroup(T) Class
    • Aggregators Class
    • BoundaryIntervalBehavior Enumeration
    • CategoricalEncoding Class
    • DataFrame Class
    • DataFrame(R, C) Class
    • DataFrameRow(R, C) Class
    • DateTimeExtensions Class
    • DateTimeUnit Enumeration
    • Direction Enumeration
    • Grouping Class
    • Grouping(TKey) Class
    • Histogram Class
    • Histogram(T) Class
    • IAccumulator(T, U) Interface
    • IAccumulator2(T, U) Interface
    • IAccumulator2(T, U, V) Interface
    • IAggregator Interface
    • IAggregator(T) Interface
    • IAggregator2 Interface
    • IAggregator2(T) Interface
    • IDataFrame Interface
    • IGrouping Interface
    • IIndex Interface
    • Index Class
    • Index(T) Class
    • IntervalIndex(T) Class
    • IPivot Interface
    • JoinIndex Class
    • JoinType Enumeration
    • MissingValueAction Enumeration
    • MissingValueException Class
    • MultipleMissingValueAction Enumeration
    • Parameter(T) Class
    • ParameterVector(T) Class
    • Pivot Class
    • Pivot(R, C) Class
    • RankTiebreaker Enumeration
    • Recurrence Class
    • SortOrder Enumeration
    • SpecialBins Enumeration
    • Subset Class
    • TransformedParameter(T) Class
    • TypePreservingAggregatorGroup Class
    • VectorExtensions Class
  • DataFrame(R, C) Class
    • DataFrame(R, C) Constructor
    • Properties
    • Methods
    • Operators
  • Methods
    • AddColumn Method Overloads
    • Aggregate Method Overloads
    • AggregateBy Method Overloads
    • Append Method Overloads
    • ApplyWith(T) Method
    • Clone Method
    • CombineWith(T) Method
    • Describe Method
    • GetColumn Method Overloads
    • GetColumns Method Overloads
    • GetColumnsAt Method Overloads
    • GetEnumerator Method
    • GetNearestRow Method
    • GetNearestRowAs(T) Method
    • GetNearestRows Method
    • GetRow Method
    • GetRowAs(T) Method
    • GetRowAt Method
    • GetRowAtAs(T) Method
    • GetRows Method Overloads
    • GetRowsAt Method
    • GroupBy Method Overloads
    • GroupedBy(R1) Method
    • Head Method
    • MakeCategorical Method Overloads
    • MakeCategoricalAt Method Overloads
    • Map Method Overloads
    • MapAndAppend Method Overloads
    • MapAndInsertAfter Method Overloads
    • MapAndReplace Method Overloads
    • Pivot Method Overloads
    • PivotBy(R1, C1) Method
    • RemoveColumn Method
    • RemoveColumnAt Method
    • RemoveColumnsAt Method
    • RemoveColumnsWithMissingValues Method
    • RemoveRowIndex Method Overloads
    • RemoveRows Method Overloads
    • RemoveRowsAt Method
    • RemoveRowsWithMissingValues Method Overloads
    • RenameColumn Method Overloads
    • RenameColumns Method
    • ReplaceMissingValues Method Overloads
    • SelectRows Method Overloads
    • SortBy Method Overloads
    • SortByIndex Method Overloads
    • Stack Method Overloads
    • Summarize Method Overloads
    • Tail Method
    • ToMatrix(T) Method
    • ToString Method
    • TransformColumns Method Overloads
    • TryGetRow Method
    • Unstack(T) Method
    • WithColumnIndex(C1) Method
    • WithRowIndex Method Overloads
  • Pivot Method Overloads
    • Pivot(R1, C1, T) Method (C, C, C)
    • Pivot(R1, C1, T) Method (C, C, C, AggregatorGroup(T))
  • Pivot(R1, C1, T) Method (C, C, C, AggregatorGroup(T))

DataFrameR, CPivotR1, C1, T Method (C, C, C, AggregatorGroupT)

Extreme Optimization Numerical Libraries for .NET Professional
Constructs a new data frame using the specified columns as row and column indexes and aggregates the values corresponding to each row-column pair.

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

C#
VB
C++
F#
Copy
public DataFrame<R1, C1> Pivot<R1, C1, T>(
	C rows,
	C columns,
	C values,
	AggregatorGroup<T> aggregator
)
Public Function Pivot(Of R1, C1, T) ( 
	rows As C,
	columns As C,
	values As C,
	aggregator As AggregatorGroup(Of T)
) As DataFrame(Of R1, C1)
public:
generic<typename R1, typename C1, typename T>
DataFrame<R1, C1>^ Pivot(
	C rows, 
	C columns, 
	C values, 
	AggregatorGroup<T>^ aggregator
)
member Pivot : 
        rows : 'C * 
        columns : 'C * 
        values : 'C * 
        aggregator : AggregatorGroup<'T> -> DataFrame<'R1, 'C1> 

Parameters

rows
Type: C
The key of the column that contains the row indexes.
columns
Type: C
The key of the column that contains the column indexes.
values
Type: C
The key of the column that contains the values.
aggregator
Type: Extreme.DataAnalysisAggregatorGroupT
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

Type: DataFrameR1, 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

ExceptionCondition
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

Reference

DataFrameR, C Class
Pivot Overload
Extreme.DataAnalysis Namespace

Copyright (c) 2004-2021 ExoAnalytics Inc.

Send comments on this topic to support@extremeoptimization.com

Copyright © 2004-2021, Extreme Optimization. All rights reserved.
Extreme Optimization, Complexity made simple, M#, and M Sharp are trademarks of ExoAnalytics Inc.
Microsoft, Visual C#, Visual Basic, Visual Studio, Visual Studio.NET, and the Optimized for Visual Studio logo
are registered trademarks of Microsoft Corporation.