Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import org.jetbrains.kotlinx.dataframe.annotations.AccessApiOverload
import org.jetbrains.kotlinx.dataframe.annotations.HasSchema
import org.jetbrains.kotlinx.dataframe.annotations.Interpretable
import org.jetbrains.kotlinx.dataframe.annotations.Refine
import org.jetbrains.kotlinx.dataframe.api.GroupByDocs.Grammar
import org.jetbrains.kotlinx.dataframe.columns.BaseColumn
import org.jetbrains.kotlinx.dataframe.columns.ColumnAccessor
import org.jetbrains.kotlinx.dataframe.columns.ColumnPath
Expand Down Expand Up @@ -429,6 +430,10 @@ public fun <T> DataFrame<T>.add(body: AddDsl<T>.() -> Unit): DataFrame<T> {
* Returns a new [GroupBy] with the new column
* appended to each group [DataFrame] to the original list of [DataFrame.columns].
*
* Check out [`GroupBy grammar`][Grammar].
*
* For more information: {@include [DocumentationUrls.GroupByTransformation]}
*
* ## Example
*
* ```kotlin
Expand All @@ -445,8 +450,6 @@ public fun <T> DataFrame<T>.add(body: AddDsl<T>.() -> Unit): DataFrame<T> {
* }
* ```
*
* For more information: {@include [DocumentationUrls.Add]}.
*
* @param name name for a new column.
* If it is empty, a unique column name will be generated.
* Otherwise, it should be unique for original group [DataFrame]s.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ internal interface GroupByDocs {
* {@include [Indent]}
* `\[ `__`.`__[**`add`**][GroupBy.add]**`(`**`column: `[`DataColumn`][DataColumn]**`) { `**`rowExpression: `[`RowExpression`][RowExpression]**` } `**`]`
*
* See [GroupBy Transformations][Transformation].
*
* ### Reduce [GroupBy] into [DataFrame]
*
* {@include [Indent]}
Expand Down Expand Up @@ -138,6 +140,8 @@ internal interface GroupByDocs {
* {@include [Indent]}
* `| `__`.`__[**`values`**][ReducedGroupBy.values]**` { `**`valueColumns: `[`ColumnsSelector`][ColumnsSelector]**` }`**
*
* See [GroupBy Reducing][Reducing].
*
* ### Aggregate [GroupBy] into [DataFrame]
*
* {@include [Indent]}
Expand All @@ -164,6 +168,8 @@ internal interface GroupByDocs {
* {@include [Indent]}
* `| `__`.`__[<aggregation_statistic>][AggregationStatistics]
*
* See [GroupBy Aggregations][Aggregation].
*
* ### Pivot [GroupBy] into [PivotGroupBy] and reduce / aggregate it
*
* {@include [Indent]}
Expand Down Expand Up @@ -240,11 +246,14 @@ internal interface GroupByDocs {
* * [sortBy][GroupBy.sortBy] / [sortByDesc][GroupBy.sortByDesc] — sorts the **order of rows within each group**
* by one or more column values;
* * [updateGroups][GroupBy.updateGroups] — transforms each group into a new one;
* * [filter][GroupBy.filter] — filters group rows by the given predicate (as usual [DataFrame.filter]);
* * [filter][GroupBy.filter] — filters out keys and corresponding groups that
* do not satisfy the given key-group predicate;
* * [add][GroupBy.add] — adds a new column to each group.
*
* Each method returns a new [GroupBy] with updated group order or modified group content.
*
* Check out [`GroupBy grammar`][Grammar].
*
* For more information: {@include [DocumentationUrls.GroupByTransformation]}
*/
typealias Transformation = Nothing
Expand Down Expand Up @@ -545,6 +554,10 @@ public interface GroupBy<out T, out G> : Grouped<G> {
* Creates a new [GroupBy] by transforming each group’s [DataFrame]
* using the provided [transform] function.
*
* Check out [`GroupBy grammar`][Grammar].
*
* For more information: {@include [DocumentationUrls.GroupByTransformation]}
*
* __NOTE:__ This operation removes key-column status from each column in the group.
* In other words, each column in the group is treated as a new column,
* and not omitted when [`.values()`][Grouped.values] or other aggregations are called.
Expand All @@ -561,6 +574,10 @@ public interface GroupBy<out T, out G> : Grouped<G> {
* The [predicate] is a [GroupedRowFilter], which behaves similarly to a [RowFilter] used in [DataFrame.filter],
* but also provides access to the [group][GroupedDataRow.group] in the current row.
*
* Check out [`GroupBy grammar`][Grammar].
*
* For more information: {@include [DocumentationUrls.GroupByTransformation]}
*
* ### Example
* ```kotlin
* // Keep only key–group pairs where the "category" key equals "Engineer"
Expand Down
Loading
Loading