Pivot
A dataframe-like structure that contains all unique combinations of key values as columns (or column groups for multiple keys) with a single row with the corresponding groups for each key combination (each represented as a DataFrame).
Similar to GroupBy but contains horizontal groups.
A Pivot can be:
reducedinto aDataRow, where each group is collapsed into a single representative row;aggregatedinto aDataRow, where each group is transformed into a new row of derived values;groupedinto aPivotGroupBystructure, which combinespivotandgroupByoperations and then reduced or aggregated into aDataFrame.
Check out .Pivot Grammar
For more information: See pivot on the documentation website.
Inheritors
Functions
Reduces this Pivot by taking the first row from each group, and returns a ReducedPivot that contains the first row from the corresponding group in each column.
Groups the rows of this Pivot groups based on the values in one or more specified key columns. Returns a PivotGroupBy.
Groups the rows of this Pivot into a PivotGroupBy based on the values of all columns except the pivot key columns. For example, if a DataFrame has columns "a", "b", "c", "d" and is pivoted by "a" and "c", then this Pivot will be grouped by the remaining columns "b" and "d".
Emulates selecting all columns whose values are mutually comparable to each other. These are columns of type R where R : Comparable<R>.
Reduces this Pivot by taking the last row from each group, and returns a ReducedPivot that contains the last row from the corresponding group in each column.
Aggregates this Pivot by computing the maximum of the values of each suitable column separately, per group.
Aggregates this Pivot by computing a single maximum of all the values in the selected columns, per group.
Reduces this Pivot by taking from each group the first row for which the given rowExpression returns the maximum value.
Reduces this Pivot by taking from each group the first row that has the largest value in the given column.
Aggregates this Pivot by computing the maximum of the values of each selected column separately, per group.
Aggregates this Pivot by computing the mean of the values of each suitable column separately, per group.
Aggregates this Pivot by computing a single mean of means of the selected columns, per group.
Aggregates this Pivot by computing the mean of the values of each selected column separately, per group.
Aggregates this Pivot by computing the median of the values of each suitable column separately, per group.
Aggregates this Pivot by computing a single median of all the values in the selected columns, per group.
Reduces this Pivot by taking from each group the row at the median of the values that the given rowExpression returns for each row of that group.
Reduces this Pivot by taking from each group the row at the median of the values in the given column.
Aggregates this Pivot by computing the median of the values of each selected column separately, per group.
Aggregates this Pivot by computing the minimum of the values of each suitable column separately, per group.
Aggregates this Pivot by computing a single minimum of all the values in the selected columns, per group.
Reduces this Pivot by taking from each group the first row for which the given rowExpression returns the minimum value.
Reduces this Pivot by taking from each group the first row that has the smallest value in the given column.
Aggregates this Pivot by computing the minimum of the values of each selected column separately, per group.
Aggregates this Pivot by computing the given percentile of the values of each suitable column separately, per group.
Aggregates this Pivot by computing a single percentile of all the values in the selected columns, per group.
Reduces this Pivot by taking from each group the row at the given percentile of the values that the given rowExpression returns for each row of that group.
Reduces this Pivot by taking from each group the row at the given percentile of the values in the given column.
Aggregates this Pivot by computing the given percentile of the values of each selected column separately, per group.
Aggregates this Pivot by computing the given percentile of the values that the given expression returns for each row, per group.
Aggregates this Pivot by computing the standard deviation of the values of each suitable column separately, per group.
Aggregates this Pivot by computing a single standard deviation of all the values in the selected columns, per group.
Aggregates this Pivot by computing the standard deviation of the values of each selected column separately, per group.
Aggregates this Pivot by computing the sum of the values of each suitable column separately, per group.
Aggregates this Pivot by computing a single sum of all the values in the selected columns, per group.
Aggregates this Pivot by computing the sum of the values of each selected column separately, per group.