Skip to content

Commit 3d40ee3

Browse files
pivot kdocs fixes
1 parent 59a9630 commit 3d40ee3

File tree

4 files changed

+384
-96
lines changed

4 files changed

+384
-96
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/groupBy.kt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,16 @@ internal interface GroupByDocs {
163163
* ### Pivot [GroupBy] into [PivotGroupBy] and reduce / aggregate it
164164
*
165165
* {@include [Indent]}
166-
* `| `__`.`__[**`pivot`**][GroupBy.pivot]**` { `**`columns: `[`ColumnsSelector`][ColumnsSelector]**` }`**
166+
* [GroupBy][GroupBy]`.`[**`pivot`**][GroupBy.pivot]**` { `**`columns: `[`ColumnsSelector`][ColumnsSelector]**` }`**
167167
*
168168
* {@include [Indent]}
169169
* ` \[ `__`.`__[**`default`**][PivotGroupBy.default]**`(`**`defaultValue`**`) `**`]`
170170
*
171171
* {@include [Indent]}
172-
* `| `__`.`__[<pivot_reducer>][PivotGroupByDocs.Reducing]
172+
* __`.`__[<pivot_groupBy_reducer>][PivotGroupByDocs.Reducing]
173173
*
174174
* {@include [Indent]}
175-
* `| `__`.`__[<pivot_aggregator>][PivotGroupByDocs.Aggregation]
175+
* `| `__`.`__[<pivot_groupBy_groupBy>][PivotGroupByDocs.Aggregation]
176176
*
177177
* Check out [PivotGroupBy Grammar][PivotGroupByDocs.Grammar] for more information.
178178
*/
@@ -262,8 +262,8 @@ internal interface GroupByDocs {
262262
* These functions return a [ReducedGroupBy], which can then be transformed into a new [DataFrame]
263263
* containing the reduced rows (either original or transformed) using one of the following methods:
264264
* * [concat][ReducedGroupBy.concat] — simply concatenates all reduced rows;
265-
* * [values][ReducedGroupBy.values] — creates a [DataFrame] with new rows by transforming each reduced row
266-
* using [ColumnsForAggregateSelectionDsl];
265+
* * [values][ReducedGroupBy.values] — creates a [DataFrame] containing the values
266+
* from the reduced rows in the selected columns.
267267
* * [into][ReducedGroupBy.into] — creates a new column with values computed with [RowExpression] on each row,
268268
* or a new [column group][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup]
269269
* containing each group reduced to a single row;
@@ -289,14 +289,16 @@ internal interface GroupByDocs {
289289
* The following aggregation methods are available:
290290
* * [concat][GroupBy.concat] — concatenates all rows from all groups into a single [DataFrame],
291291
* without preserving grouping keys;
292+
* * [toDataFrame][GroupBy.toDataFrame] — returns this [GroupBy] as [DataFrame] with the grouping keys and
293+
* corresponding groups in [FrameColumn].
292294
* * [concatWithKeys][GroupBy.concatWithKeys] — a variant of [concat][GroupBy.concat] that also includes
293295
* grouping keys that were not present in the original [DataFrame];
294296
* * [into][GroupBy.into] — creates a new column containing a list of values computed with a [RowExpression]
295297
* for each group, or a new [frame column][org.jetbrains.kotlinx.dataframe.columns.FrameColumn]
296298
* containing the groups themselves;
297-
* * [values][ReducedGroupBy.values] — creates a [DataFrame] with new rows produced by transforming
298-
* each group using [ColumnsForAggregateSelectionDsl];
299-
* * [count][Grouped.count] — returns a [DataFrame] containing the grouping key columns and an additional column
299+
* * [values][Grouped.values] — creates a [DataFrame] containing values collected into a single [List]
300+
* from all rows of each group for the selected columns.
301+
* * [count][Grouped.count] — creates a [DataFrame] containing the grouping key columns and an additional column
300302
* with the number of rows in each corresponding group;
301303
* * [aggregate][Grouped.aggregate] — performs a set of custom aggregations using [AggregateDsl],
302304
* allowing you to compute one or more derived values per group;
@@ -375,7 +377,7 @@ public fun <T> DataFrame<T>.groupBy(vararg cols: AnyColumnReference, moveToTop:
375377
// endregion
376378

377379
/**
378-
* Groups the rows of this [Pivot] into [PivotGroupBy]
380+
* Groups the rows of this [Pivot] groups
379381
* based on the values in one or more specified [key columns][\columns].
380382
*
381383
* Works like regular [DataFrame.groupBy] on pivot groups.

0 commit comments

Comments
 (0)