All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlinx.ggdsl.dataframe.groupBy.kt Maven / Gradle / Ivy

There is a newer version: 0.3.2-dev-7
Show newest version
package org.jetbrains.kotlinx.ggdsl.dataframe

import org.jetbrains.kotlinx.dataframe.columns.ColumnReference
import org.jetbrains.kotlinx.ggdsl.dataframe.data.DataFrameWrapper
import org.jetbrains.kotlinx.ggdsl.dsl.internal.GroupedDataSubContextImmutable
import org.jetbrains.kotlinx.ggdsl.dsl.internal.NamedDataPlotContext

/**
 * Performs grouping of this plot dataset by given columns.
 * Creates [GroupedDataSubContextImmutable].
 *
 * @param columnReferences references to grouping keys columns.
 */
public inline fun NamedDataPlotContext.groupBy(
    vararg columnReferences: ColumnReference<*>,
    block: GroupedDataSubContextImmutable.() -> Unit
) {
    GroupedDataSubContextImmutable(
        (data as DataFrameWrapper).groupBy(*columnReferences),
        layers,
        this
    ).apply(block)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy