GroupByImpl

internal class GroupByImpl<T, G>(val df: DataFrame<T>, val groups: FrameColumn<G>, val keyColumnsInGroups: ColumnsSelector<G, *>) : GroupBy<T, G> , AggregatableInternal<G>

Constructors

Link copied to clipboard
constructor(df: DataFrame<T>, groups: FrameColumn<G>, keyColumnsInGroups: ColumnsSelector<G, *>)

Properties

Link copied to clipboard
val df: DataFrame<T>

DataFrame containing groups column and key columns. Represents GroupBy.

Link copied to clipboard
open override val groups: FrameColumn<G>

A FrameColumn representing all groups of rows. Each cell contains a DataFrame with the subset of rows that share the same key values.

Link copied to clipboard
Link copied to clipboard
open override val keys: DataFrame<T>

A DataFrame representing the grouping keys. Each column corresponds to a key column, and each row corresponds to a unique group.

Functions

Link copied to clipboard
inline fun <reified R, T, G> GroupBy<T, G>.add(name: String, infer: Infer = Infer.Nulls, noinline expression: AddExpression<G, R>): GroupBy<T, G>

Creates a new column using AddExpression and adds a new column to the end of each group (i.e., DataFrames) of this GroupBy (at the top level).

inline fun <reified R, T, G> GroupBy<T, G>.add(column: ColumnAccessor<G>, infer: Infer = Infer.Nulls, noinline expression: AddExpression<G, R>): GroupBy<T, G>
Link copied to clipboard

Aggregates this GroupBy using the provided statistics inside the AggregateGroupedDsl.

Link copied to clipboard
internal fun <T, C, R> Grouped<T>.aggregateAll(aggregator: Aggregator<C & Any, R>, columns: ColumnsSelector<T, C>, name: String?): DataFrame<T>
Link copied to clipboard
Link copied to clipboard
internal inline fun <T, reified C, reified R> Grouped<T>.aggregateOf(resultName: String?, crossinline expression: RowExpression<T, C>, aggregator: Aggregator<C & Any, R>): DataFrame<T>
Link copied to clipboard
internal fun <T, R> Grouped<T>.aggregateValue(resultName: String, body: AggregateBody<T, R>): DataFrame<T>
Link copied to clipboard
fun <T, G> GroupBy<*, *>.cast(): GroupBy<T, G>
Link copied to clipboard
fun <T, G> GroupBy<T, G>.concat(): DataFrame<G>

Returns a DataFrame containing all groups in this GroupBy.

Link copied to clipboard

Returns a DataFrame containing all groups in this GroupBy and every grouping key column that is missing from those groups.

Link copied to clipboard
fun <T> Grouped<T>.count(resultName: String = "count"): DataFrame<T>

Aggregates this GroupBy by counting the number of rows in each group.

inline fun <T> Grouped<T>.count(resultName: String = "count", crossinline predicate: RowFilter<T>): DataFrame<T>

Aggregates this GroupBy by counting the number of rows in each group that satisfy the given predicate.

Link copied to clipboard
fun <T> Grouped<T>.countDistinct(resultName: String = "countDistinct"): DataFrame<T>

Aggregates this GroupBy by counting the number of distinct rows in each group.

fun <T, C> Grouped<T>.countDistinct(resultName: String = "countDistinct", columns: ColumnsSelector<T, C>): DataFrame<T>

Aggregates this GroupBy by counting the number of distinct combinations of values in the selected columns in each group.

Link copied to clipboard
fun <T, G> GroupBy<T, G>.cumSum(skipNA: Boolean = defaultCumSumSkipNA): GroupBy<T, G>
fun <T, G, C : Number?> GroupBy<T, G>.cumSum(skipNA: Boolean = defaultCumSumSkipNA, columns: ColumnsSelector<G, C>): GroupBy<T, G>
fun <T, G> GroupBy<T, G>.cumSum(vararg columns: String, skipNA: Boolean = defaultCumSumSkipNA): GroupBy<T, G>
fun <T, G> GroupBy<T, G>.cumSum(vararg columns: KProperty<Number?>, skipNA: Boolean = defaultCumSumSkipNA): GroupBy<T, G>
fun <T, G> GroupBy<T, G>.cumSum(vararg columns: ColumnReference<Number?>, skipNA: Boolean = defaultCumSumSkipNA): GroupBy<T, G>

Computes the cumulative sums of the values in each column from the GroupBy from the first cell to the last cell.

Link copied to clipboard
open override fun filter(predicate: GroupedRowFilter<T, G>): GroupBy<T, G>

Filters the rows of this GroupBy — that is, the key–group pairs — based on the specified predicate.

Link copied to clipboard
fun <T, G> GroupBy<T, G>.first(): ReducedGroupBy<T, G>

Reduces the groups of this GroupBy by taking the first row from each group, and returns a ReducedGroupBy containing these rows (one row per group, each row is the first row in its group).

fun <T, G> GroupBy<T, G>.first(predicate: RowFilter<G>): ReducedGroupBy<T, G>

Reduces the groups of this GroupBy by taking from each group the first row satisfying the given predicate, and returns a ReducedGroupBy containing these rows (one row per group, each row is the first row in its group that satisfies the predicate).

Link copied to clipboard
inline fun <T, G> GroupBy<T, G>.forEach(body: (GroupBy.Entry<T, G>) -> Unit)

Calls body for every key–group pair of this GroupBy, in the order in which the pairs appear in it.

Link copied to clipboard
Link copied to clipboard
fun <T> GroupBy<T, *>.into(column: KProperty<DataFrame<*>>): DataFrame<T>
fun <T> GroupBy<T, *>.into(column: ColumnAccessor<DataFrame<*>>): DataFrame<T>
inline fun <T, G, reified V> GroupBy<T, G>.into(column: KProperty<V>, noinline expression: RowExpression<G, V>): DataFrame<G>
inline fun <T, G, reified V> GroupBy<T, G>.into(column: ColumnAccessor<V>, noinline expression: RowExpression<G, V>): DataFrame<G>
internal fun <T, G, V> GroupBy<T, G>.into(path: ColumnPath, expression: RowExpression<G, V>, type: KType): DataFrame<G>

fun <T, G> GroupBy<T, G>.into(column: String): DataFrame<T>

Converts this GroupBy into a DataFrame.

inline fun <T, G, reified V> GroupBy<T, G>.into(columnName: String? = null, noinline expression: RowExpression<G, V>): DataFrame<G>

Aggregates this GroupBy into a DataFrame by computing the values of expression on all rows for each group.

Link copied to clipboard

Emulates selecting all columns whose values are mutually comparable to each other. These are columns of type R where R : Comparable<R>.

Link copied to clipboard
fun <T, G> GroupBy<T, G>.last(): ReducedGroupBy<T, G>

Reduces the groups of this GroupBy by taking the last row from each group, and returns a ReducedGroupBy containing these rows (one row per group, each row is the last row in its group).

fun <T, G> GroupBy<T, G>.last(predicate: RowFilter<G>): ReducedGroupBy<T, G>

Reduces the groups of this GroupBy by taking from each group the last row satisfying the given predicate, and returns a ReducedGroupBy containing these rows (one row per group, each row is the last row in its group that satisfies the predicate).

Link copied to clipboard
inline fun <T, G, R> GroupBy<T, G>.map(body: Selector<GroupWithKey<T, G>, R>): List<R>

Returns a List with the values that body computes from the key–group pairs of this GroupBy.

Link copied to clipboard

Returns a FrameColumn with the dataframes that body computes from the key–group pairs of this GroupBy.

Link copied to clipboard

Returns a DataFrame with the rows that body computes from the key–group pairs of this GroupBy.

Link copied to clipboard
fun <T> Grouped<T>.max(skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the maximum of the values of each suitable column separately, per group.

fun <T, C : Comparable<C & Any>?> Grouped<T>.max(name: String? = null, skipNaN: Boolean = skipNaNDefault, columns: ColumnsSelector<T, C?>): DataFrame<T>
fun <T> Grouped<T>.max(vararg columns: String, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing a single maximum of all the values in the selected columns, per group.

fun <T, C : Comparable<C & Any>?> Grouped<T>.max(vararg columns: KProperty<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Comparable<C & Any>?> Grouped<T>.max(vararg columns: ColumnReference<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
inline fun <T, G, reified R : Comparable<R & Any>?> GroupBy<T, G>.maxBy(skipNaN: Boolean = skipNaNDefault, crossinline rowExpression: RowExpression<G, R>): ReducedGroupBy<T, G>

Reduces each group of this GroupBy to the first row for which the given rowExpression returns the maximum value.

fun <T, G> GroupBy<T, G>.maxBy(column: String, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>

Reduces each group of this GroupBy to the first row that has the largest value in the column with the given name.

inline fun <T, G, reified C : Comparable<C & Any>?> GroupBy<T, G>.maxBy(column: KProperty<C>, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>
inline fun <T, G, reified C : Comparable<C & Any>?> GroupBy<T, G>.maxBy(column: ColumnReference<C>, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>
Link copied to clipboard
fun <T, C : Comparable<*>?> Grouped<T>.maxFor(skipNaN: Boolean = skipNaNDefault, columns: ColumnsForAggregateSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.maxFor(vararg columns: String, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the maximum of the values of each selected column separately, per group.

fun <T, C : Comparable<*>?> Grouped<T>.maxFor(vararg columns: KProperty<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Comparable<*>?> Grouped<T>.maxFor(vararg columns: ColumnReference<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
inline fun <T, reified C : Comparable<C & Any>?> Grouped<T>.maxOf(name: String? = null, skipNaN: Boolean = skipNaNDefault, crossinline expression: RowExpression<T, C>): DataFrame<T>

Aggregates this GroupBy by computing the maximum of the values that the given expression returns for each row of a group.

Link copied to clipboard
fun <T> Grouped<T>.mean(skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the mean of the values of each suitable column separately, per group.

fun <T, C : Number?> Grouped<T>.mean(name: String? = null, skipNaN: Boolean = skipNaNDefault, columns: ColumnsSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.mean(vararg columns: String, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing a single mean of means of the selected columns, per group.

fun <T, C : Number?> Grouped<T>.mean(vararg columns: KProperty<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Number?> Grouped<T>.mean(vararg columns: ColumnReference<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
fun <T, C : Number?> Grouped<T>.meanFor(skipNaN: Boolean = skipNaNDefault, columns: ColumnsForAggregateSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.meanFor(vararg columns: String, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the mean of the values of each selected column separately, per group.

fun <T, C : Number?> Grouped<T>.meanFor(vararg columns: KProperty<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Number?> Grouped<T>.meanFor(vararg columns: ColumnReference<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
inline fun <T, reified R : Number?> Grouped<T>.meanOf(name: String? = null, skipNaN: Boolean = skipNaNDefault, crossinline expression: RowExpression<T, R>): DataFrame<T>

Aggregates this GroupBy by computing the mean of the values that the given expression returns for each row of a group.

Link copied to clipboard
fun <T> Grouped<T>.median(skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the median of the values of each suitable column separately, per group.

fun <T, C : Comparable<C & Any>?> Grouped<T>.median(name: String? = null, skipNaN: Boolean = skipNaNDefault, columns: ColumnsSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.median(vararg columns: String, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing a single median of all the values in the selected columns, per group.

fun <T, C : Comparable<C & Any>?> Grouped<T>.median(vararg columns: KProperty<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Comparable<C & Any>?> Grouped<T>.median(vararg columns: ColumnReference<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
inline fun <T, G, reified R : Comparable<R & Any>?> GroupBy<T, G>.medianBy(skipNaN: Boolean = skipNaNDefault, crossinline rowExpression: RowExpression<G, R>): ReducedGroupBy<T, G>

Reduces each group of this GroupBy to the row at the median of the values that the given rowExpression returns for each row of that group.

fun <T, G> GroupBy<T, G>.medianBy(column: String, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>

Reduces each group of this GroupBy to the row at the median of the values in the column with the given name.

inline fun <T, G, reified C : Comparable<C & Any>?> GroupBy<T, G>.medianBy(column: KProperty<C>, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>
inline fun <T, G, reified C : Comparable<C & Any>?> GroupBy<T, G>.medianBy(column: ColumnReference<C>, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>
Link copied to clipboard
fun <T, C : Comparable<*>?> Grouped<T>.medianFor(skipNaN: Boolean = skipNaNDefault, columns: ColumnsForAggregateSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.medianFor(vararg columns: String, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the median of the values of each selected column separately, per group.

fun <T, C : Comparable<*>?> Grouped<T>.medianFor(vararg columns: KProperty<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Comparable<*>?> Grouped<T>.medianFor(vararg columns: ColumnReference<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
inline fun <T, reified R : Comparable<R & Any>?> Grouped<T>.medianOf(name: String? = null, skipNaN: Boolean = skipNaNDefault, crossinline expression: RowExpression<T, R>): DataFrame<T>

Aggregates this GroupBy by computing the median of the values that the given expression returns for each row of a group.

Link copied to clipboard
fun <T> Grouped<T>.min(skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the minimum of the values of each suitable column separately, per group.

fun <T, C : Comparable<C & Any>?> Grouped<T>.min(name: String? = null, skipNaN: Boolean = skipNaNDefault, columns: ColumnsSelector<T, C?>): DataFrame<T>
fun <T> Grouped<T>.min(vararg columns: String, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing a single minimum of all the values in the selected columns, per group.

fun <T, C : Comparable<C & Any>?> Grouped<T>.min(vararg columns: KProperty<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Comparable<C & Any>?> Grouped<T>.min(vararg columns: ColumnReference<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
inline fun <T, G, reified R : Comparable<R & Any>?> GroupBy<T, G>.minBy(skipNaN: Boolean = skipNaNDefault, crossinline rowExpression: RowExpression<G, R>): ReducedGroupBy<T, G>

Reduces each group of this GroupBy to the first row for which the given rowExpression returns the minimum value.

fun <T, G> GroupBy<T, G>.minBy(column: String, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>

Reduces each group of this GroupBy to the first row that has the smallest value in the column with the given name.

inline fun <T, G, reified C : Comparable<C & Any>?> GroupBy<T, G>.minBy(column: KProperty<C>, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>
inline fun <T, G, reified C : Comparable<C & Any>?> GroupBy<T, G>.minBy(column: ColumnReference<C>, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>
Link copied to clipboard
fun <T, C : Comparable<*>?> Grouped<T>.minFor(skipNaN: Boolean = skipNaNDefault, columns: ColumnsForAggregateSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.minFor(vararg columns: String, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the minimum of the values of each selected column separately, per group.

fun <T, C : Comparable<*>?> Grouped<T>.minFor(vararg columns: KProperty<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Comparable<*>?> Grouped<T>.minFor(vararg columns: ColumnReference<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
inline fun <T, reified C : Comparable<C & Any>?> Grouped<T>.minOf(name: String? = null, skipNaN: Boolean = skipNaNDefault, crossinline expression: RowExpression<T, C>): DataFrame<T>

Aggregates this GroupBy by computing the minimum of the values that the given expression returns for each row of a group.

Link copied to clipboard
Link copied to clipboard
fun <T> Grouped<T>.percentile(percentile: Double, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the given percentile of the values of each suitable column separately, per group.

fun <T, C : Comparable<C & Any>?> Grouped<T>.percentile(percentile: Double, name: String? = null, skipNaN: Boolean = skipNaNDefault, columns: ColumnsSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.percentile(percentile: Double, vararg columns: String, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing a single percentile of all the values in the selected columns, per group.

fun <T, C : Comparable<C & Any>?> Grouped<T>.percentile(percentile: Double, vararg columns: KProperty<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Comparable<C & Any>?> Grouped<T>.percentile(percentile: Double, vararg columns: ColumnReference<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
inline fun <T, G, reified R : Comparable<R & Any>?> GroupBy<T, G>.percentileBy(percentile: Double, skipNaN: Boolean = skipNaNDefault, crossinline rowExpression: RowExpression<G, R>): ReducedGroupBy<T, G>

Reduces each group of this GroupBy to the row at the given percentile of the values that the given rowExpression returns for each row of that group.

fun <T, G> GroupBy<T, G>.percentileBy(percentile: Double, column: String, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>

Reduces each group of this GroupBy to the row at the given percentile of the values in the column with the given name.

inline fun <T, G, reified C : Comparable<C & Any>?> GroupBy<T, G>.percentileBy(percentile: Double, column: KProperty<C>, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>
inline fun <T, G, reified C : Comparable<C & Any>?> GroupBy<T, G>.percentileBy(percentile: Double, column: ColumnReference<C>, skipNaN: Boolean = skipNaNDefault): ReducedGroupBy<T, G>
Link copied to clipboard
fun <T, C : Comparable<*>?> Grouped<T>.percentileFor(percentile: Double, skipNaN: Boolean = skipNaNDefault, columns: ColumnsForAggregateSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.percentileFor(percentile: Double, vararg columns: String, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the given percentile of the values of each selected column separately, per group.

fun <T, C : Comparable<*>?> Grouped<T>.percentileFor(percentile: Double, vararg columns: KProperty<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Comparable<*>?> Grouped<T>.percentileFor(percentile: Double, vararg columns: ColumnReference<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
inline fun <T, reified R : Comparable<R & Any>?> Grouped<T>.percentileOf(percentile: Double, name: String? = null, skipNaN: Boolean = skipNaNDefault, crossinline expression: RowExpression<T, R>): DataFrame<T>

Aggregates this GroupBy by computing the given percentile of the values that the given expression returns for each row of a group.

Link copied to clipboard
fun <G> GroupBy<*, G>.pivot(inward: Boolean = true, columns: PivotColumnsSelector<G, *>): PivotGroupBy<G>
fun <G> GroupBy<*, G>.pivot(vararg columns: String, inward: Boolean = true): PivotGroupBy<G>

Pivots the selected columns of this GroupBy groups. Returns a PivotGroupBy.

fun <G> GroupBy<*, G>.pivot(vararg columns: KProperty<*>, inward: Boolean = true): PivotGroupBy<G>
fun <G> GroupBy<*, G>.pivot(vararg columns: ColumnReference<*>, inward: Boolean = true): PivotGroupBy<G>
Link copied to clipboard
fun <G> GroupBy<*, G>.pivotCounts(inward: Boolean = true, columns: PivotColumnsSelector<G, *>): DataFrame<G>
fun <G> GroupBy<*, G>.pivotCounts(vararg columns: String, inward: Boolean = true): DataFrame<G>

Computes a count matrix (similar to frequency encoding) for the values in the specified columns within each group of this GroupBy, returning a new DataFrame where:

fun <G> GroupBy<*, G>.pivotCounts(vararg columns: KProperty<*>, inward: Boolean = true): DataFrame<G>
fun <G> GroupBy<*, G>.pivotCounts(vararg columns: ColumnReference<*>, inward: Boolean = true): DataFrame<G>
Link copied to clipboard
fun <G> GroupBy<*, G>.pivotMatches(inward: Boolean = true, columns: PivotColumnsSelector<G, *>): DataFrame<G>
fun <G> GroupBy<*, G>.pivotMatches(vararg columns: String, inward: Boolean = true): DataFrame<G>

Computes a presence matrix (similar to one-hot encoding) for the values in the specified columns within each group of this GroupBy, returning a new DataFrame where:

fun <G> GroupBy<*, G>.pivotMatches(vararg columns: KProperty<*>, inward: Boolean = true): DataFrame<G>
fun <G> GroupBy<*, G>.pivotMatches(vararg columns: ColumnReference<*>, inward: Boolean = true): DataFrame<G>
Link copied to clipboard
fun <T, G> GroupBy<T, G>.print()
Link copied to clipboard
internal fun <T, G> GroupBy<T, G>.reduce(reducer: Selector<DataFrame<G>, DataRow<G>?>): ReducedGroupBy<T, G>
Link copied to clipboard
internal inline fun <T> Aggregatable<T>.remainingColumns(crossinline predicate: (AnyCol) -> Boolean): ColumnsSelector<T, Any?>
Link copied to clipboard
open override fun remainingColumnsSelector(): ColumnsSelector<*, *>
Link copied to clipboard
Link copied to clipboard

Returns the runtime DataFrameSchema of this GroupBy seen as a DataFrame: the key columns, followed by a frame column holding the groups.

Link copied to clipboard
fun <T, G, C> GroupBy<T, G>.sortBy(selector: SortColumnsSelector<G, C>): GroupBy<T, G>

Sorts rows within each group of this GroupBy by the specified columns in ascending (default) or descending order.

fun <T, G> GroupBy<T, G>.sortBy(vararg cols: String): GroupBy<T, G>

Sorts rows within each group of this GroupBy by the specified columns in ascending order.

fun <T, G> GroupBy<T, G>.sortBy(vararg cols: KProperty<Comparable<*>?>): GroupBy<T, G>
fun <T, G> GroupBy<T, G>.sortBy(vararg cols: ColumnReference<*>): GroupBy<T, G>
Link copied to clipboard
fun <T, G> GroupBy<T, G>.sortByCount(): GroupBy<T, G>

Sorts the key-group pairs of this GroupBy by the number of rows in groups descending.

Link copied to clipboard

Sorts the key-group pairs of this GroupBy by the number of rows in groups ascending.

Link copied to clipboard
fun <T, G, C> GroupBy<T, G>.sortByDesc(selector: SortColumnsSelector<G, C>): GroupBy<T, G>

Sorts rows within each group of this GroupBy by the specified columns in ascending or descending (default) order.

fun <T, G> GroupBy<T, G>.sortByDesc(vararg cols: String): GroupBy<T, G>

Sorts rows within each group of this GroupBy by the specified columns in descending order.

fun <T, G> GroupBy<T, G>.sortByDesc(vararg cols: KProperty<Comparable<*>?>): GroupBy<T, G>
fun <T, G> GroupBy<T, G>.sortByDesc(vararg cols: ColumnReference<*>): GroupBy<T, G>
Link copied to clipboard
fun <T, G, C> GroupBy<T, G>.sortByGroup(nullsLast: Boolean = false, expression: DataFrameExpression<G, C>): GroupBy<T, G>

Sorts the key-group pairs of this GroupBy by a value computed for each group using the specified expression ascending.

Link copied to clipboard
fun <T, G, C> GroupBy<T, G>.sortByGroupDesc(nullsLast: Boolean = false, expression: DataFrameExpression<G, C>): GroupBy<T, G>

Sorts the key-group pairs of this GroupBy by a value computed for each group using the specified expression descending.

Link copied to clipboard
internal fun <T, G> GroupBy<T, G>.sortByImpl(columns: SortColumnsSelector<G, *>): GroupBy<T, G>
Link copied to clipboard
fun <T, G> GroupBy<T, G>.sortByKey(nullsLast: Boolean = false): GroupBy<T, G>

Sorts the key-group pairs of this GroupBy by the keys ascending.

Link copied to clipboard
fun <T, G> GroupBy<T, G>.sortByKeyDesc(nullsLast: Boolean = false): GroupBy<T, G>

Sorts the key-group pairs of this GroupBy by the keys descending.

Link copied to clipboard
fun <T> Grouped<T>.std(skipNaN: Boolean = skipNaNDefault, ddof: Int = ddofDefault): DataFrame<T>

Aggregates this GroupBy by computing the standard deviation of the values of each suitable column separately, per group.

fun <T, C : Number?> Grouped<T>.std(name: String? = null, skipNaN: Boolean = skipNaNDefault, ddof: Int = ddofDefault, columns: ColumnsSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.std(vararg columns: String, name: String? = null, skipNaN: Boolean = skipNaNDefault, ddof: Int = ddofDefault): DataFrame<T>

Aggregates this GroupBy by computing a single standard deviation of all the values in the selected columns, per group.

fun <T, C : Number?> Grouped<T>.std(vararg columns: KProperty<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault, ddof: Int = ddofDefault): DataFrame<T>
fun <T, C : Number?> Grouped<T>.std(vararg columns: ColumnReference<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault, ddof: Int = ddofDefault): DataFrame<T>
Link copied to clipboard
fun <T, C : Number?> Grouped<T>.stdFor(skipNaN: Boolean = skipNaNDefault, ddof: Int = ddofDefault, columns: ColumnsForAggregateSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.stdFor(vararg columns: String, skipNaN: Boolean = skipNaNDefault, ddof: Int = ddofDefault): DataFrame<T>

Aggregates this GroupBy by computing the standard deviation of the values of each selected column separately, per group.

fun <T, C : Number?> Grouped<T>.stdFor(vararg columns: KProperty<C>, skipNaN: Boolean = skipNaNDefault, ddof: Int = ddofDefault): DataFrame<T>
fun <T, C : Number?> Grouped<T>.stdFor(vararg columns: ColumnReference<C>, skipNaN: Boolean = skipNaNDefault, ddof: Int = ddofDefault): DataFrame<T>
Link copied to clipboard
inline fun <T, reified R : Number?> Grouped<T>.stdOf(name: String? = null, skipNaN: Boolean = skipNaNDefault, ddof: Int = ddofDefault, crossinline expression: RowExpression<T, R>): DataFrame<T>

Aggregates this GroupBy by computing the standard deviation of the values that the given expression returns for each row of a group.

Link copied to clipboard
fun <T> Grouped<T>.sum(skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the sum of the values of each suitable column separately, per group.

fun <T, C : Number?> Grouped<T>.sum(name: String? = null, skipNaN: Boolean = skipNaNDefault, columns: ColumnsSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.sum(vararg columns: String, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing a single sum of all the values in the selected columns, per group.

fun <T, C : Number?> Grouped<T>.sum(vararg columns: KProperty<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Number?> Grouped<T>.sum(vararg columns: ColumnReference<C>, name: String? = null, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
fun <T, C : Number?> Grouped<T>.sumFor(skipNaN: Boolean = skipNaNDefault, columns: ColumnsForAggregateSelector<T, C>): DataFrame<T>
fun <T> Grouped<T>.sumFor(vararg columns: String, skipNaN: Boolean = skipNaNDefault): DataFrame<T>

Aggregates this GroupBy by computing the sum of the values of each selected column separately, per group.

fun <T, C : Number?> Grouped<T>.sumFor(vararg columns: KProperty<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
fun <T, C : Number?> Grouped<T>.sumFor(vararg columns: ColumnReference<C>, skipNaN: Boolean = skipNaNDefault): DataFrame<T>
Link copied to clipboard
inline fun <T, reified R : Number?> Grouped<T>.sumOf(resultName: String? = null, skipNaN: Boolean = skipNaNDefault, crossinline expression: RowExpression<T, R>): DataFrame<T>

Aggregates this GroupBy by computing the sum of the values that the given expression returns for each row of a group.

Link copied to clipboard
open override fun toDataFrame(groupedColumnName: String? = null): DataFrame<T>

Converts this GroupBy into a DataFrame.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun <R> updateGroups(transform: Selector<DataFrame<G>, DataFrame<R>>): GroupBy<T, R>

Creates a new GroupBy by transforming each group’s DataFrame using the provided transform function.

Link copied to clipboard
fun <T> Grouped<T>.values(dropNA: Boolean = false, distinct: Boolean = false): DataFrame<T>
fun <T> Grouped<T>.values(dropNA: Boolean = false, distinct: Boolean = false, columns: ColumnsForAggregateSelector<T, *>): DataFrame<T>
fun <T> Grouped<T>.values(vararg columns: String, dropNA: Boolean = false, distinct: Boolean = false): DataFrame<T>
fun <T> Grouped<T>.values(vararg columns: ColumnReference<*>, dropNA: Boolean = false, distinct: Boolean = false): DataFrame<T>
Link copied to clipboard
fun <T, G> GroupBy<T, G>.xs(vararg keyValues: Any?): GroupBy<T, G>

Returns a cross-section of this GroupBy: only the key–group pairs in which the key columns hold the given keyValues, without those key columns.

fun <T, G, C> GroupBy<T, G>.xs(vararg keyValues: C, keyColumns: ColumnsSelector<T, C>): GroupBy<T, G>

Returns a cross-section of this GroupBy: only the key–group pairs in which the key columns hold the given keyValues, without those key columns.

Link copied to clipboard
internal fun <T, G, C> GroupBy<T, G>.xsImpl(vararg keyValues: C, keyColumns: ColumnsSelector<T, C>): GroupBy<T, G>