Data Frame.Unstack Method
Definition
Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Unstack<R, C>(IVector) | Transforms a vector with a two-level index into a data frame whose columns correspond to the second level in the index. |
Unstack<R1, R2, C>(DataFrame<ValueTuple<R1, R2>, C>) | Transforms a data frame with a two-level row index into a data frame whose columns correspond to the second level in the index. |
Unstack<R1, R2, R3, C>(DataFrame<ValueTuple<R1, R2, R3>, C>) | Transforms a data frame with a three-level row index into a data frame whose columns correspond to the third level in the index. |
Unstack<R1, R2, C>(DataFrame<ValueTuple<R1, R2>, C>)
Transforms a data frame with a two-level row index into a data frame whose columns
correspond to the second level in the index.
public static DataFrame<R1, (C , R2 )> Unstack<R1, R2, C>(
this DataFrame<(R1 , R2 ), C> frame
)
Parameters
- frame DataFrame<ValueTuple<R1, R2>, C>
- The data frame to transform.
Type Parameters
- R1
- The element type of the first level of the row index.
- R2
- The element type of the second level of the row index.
- C
- The element type of the column index.
Return Value
DataFrame<R1, ValueTuple<C, R2>>A new data frame whose row index is the first level of the row index of frame, and whose column index is a hierarchical index where the first level corresponds to the columns in frame and the second level corresponds to the second level in the row index of frame.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type DataFrame<ValueTuple<R1, R2>, C>. 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).Unstack<R1, R2, R3, C>(DataFrame<ValueTuple<R1, R2, R3>, C>)
Transforms a data frame with a three-level row index into a data frame whose columns
correspond to the third level in the index.
public static DataFrame<(R1 , R2 ), (C , R3 )> Unstack<R1, R2, R3, C>(
this DataFrame<(R1 , R2 , R3 ), C> frame
)
Parameters
- frame DataFrame<ValueTuple<R1, R2, R3>, C>
- The data frame to transform.
Type Parameters
- R1
- The element type of the first level of the row index.
- R2
- The element type of the second level of the row index.
- R3
- The element type of the third level of the row index.
- C
- The element type of the column index.
Return Value
DataFrame<ValueTuple<R1, R2>, ValueTuple<C, R3>>A new data frame whose row index corresponds to the first two levels of the row index of frame, and whose column index is a hierarchical index where the first level corresponds to the columns in frame and the second level corresponds to the third level in the row index of frame.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type DataFrame<ValueTuple<R1, R2, R3>, C>. 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).Unstack<R, C>(IVector)
Transforms a vector with a two-level index into a data frame whose columns
correspond to the second level in the index.
public static DataFrame<R, C> Unstack<R, C>(
this IVector vector
)
Parameters
- vector IVector
- The vector to transform.
Type Parameters
- R
- The element type of the first level of the index.
- C
- The element type of the second level of the index.
Return Value
DataFrame<R, C>A new data frame whose row index is the first level of the index of vector, and whose column index is the second level.