@@ -61,12 +61,12 @@ import kotlin.reflect.typeOf
61
61
internal interface GatherDocs {
62
62
63
63
/* *
64
- * ## {@get [GATHER_OPERATION]} Operation Grammar
64
+ * ## [gather][gather] Operation Grammar
65
65
* {@include [LineBreak]}
66
66
* {@include [DslGrammarLink]}
67
67
* {@include [LineBreak]}
68
68
*
69
- * **[ `gather`][gather]** **` { `**`columnsSelector: `[`ColumnsSelector`][ColumnsSelector]**` }`**
69
+ * [** `gather`** ][gather]**` { `**`columnsSelector: `[`ColumnsSelector`][ColumnsSelector]**` }`**
70
70
*
71
71
* {@include [Indent]}
72
72
* `\[ `__`.`__[**`explodeLists`**][Gather.explodeLists]**`() `**`]`
@@ -94,7 +94,6 @@ internal interface GatherDocs {
94
94
*
95
95
* {@include [Indent]}
96
96
* `| `__`.`__[**`valuesInto`**][Gather.valuesInto]**`(`**`valueColumn: `[`String`][String]**`)`**
97
- * {@set [GATHER_OPERATION] [**`gather`**][gather]}{@comment The default name of the `gather` operation function name.}
98
97
*/
99
98
interface Grammar
100
99
@@ -173,7 +172,7 @@ public fun <T, C> DataFrame<T>.gather(vararg columns: KProperty<C>): Gather<T, C
173
172
* Filter values in columns previously selected by [gather] using a [filter][RowValueFilter].
174
173
*
175
174
* [RowValueFilter] provides each value as a lambda argument, allowing you
176
- * to filter rows using a Boolean condition.
175
+ * to filter rows using a [ Boolean] condition.
177
176
*
178
177
* It's an intermediate step; returns a new [Gather] with filtered value columns.
179
178
*
@@ -238,7 +237,9 @@ public fun <T, C, K, R> Gather<T, C, K, R>.where(filter: RowValueFilter<T, C>):
238
237
public fun <T , C , K , R > Gather <T , C ?, K , R >.notNull (): Gather <T , C , K , R > = where { it != null } as Gather <T , C , K , R >
239
238
240
239
/* *
241
- * Explodes [List] values in the columns previously selected by [gather].
240
+ * Explodes [List] values — i.e., splits each list into individual elements,
241
+ * creating a separate row for each element, and duplicating all other columns —
242
+ * in the columns previously selected by [gather].
242
243
*
243
244
* If not all values are lists (for example, if one column contains `Double` values and
244
245
* another contains `List<Double>`), only the list values will be exploded — non-list values remain unchanged.
@@ -319,7 +320,7 @@ public fun <T, C, K, R> Gather<T, List<C>, K, R>.explodeLists(): Gather<T, C, K,
319
320
) as Gather <T , C , K , R >
320
321
321
322
/* *
322
- * Applies a [transform] to the gathering keys —
323
+ * Applies [transform] to the gathering keys —
323
324
* that is, the names of the columns previously selected by [gather].
324
325
*
325
326
* This is an intermediate step; returns a new [Gather] with transformed keys.
@@ -354,7 +355,7 @@ public inline fun <T, C, reified K, R> Gather<T, C, *, R>.mapKeys(
354
355
)
355
356
356
357
/* *
357
- * Applies a [transform] to the values from the columns previously selected by [gather].
358
+ * Applies [transform] to the values from the columns previously selected by [gather].
358
359
*
359
360
* This is an intermediate step; returns a new [Gather] with transformed values.
360
361
*
@@ -473,7 +474,8 @@ public class Gather<T, C, K, R>(
473
474
* while all other columns remain unchanged —
474
475
* except that their values are duplicated for each generated key-value pair.
475
476
*
476
- * Resulting key and value values can be adjusted using [mapKeys] and [mapValues], respectively.
477
+ * Key and value values can be adjusted beforehand
478
+ * using [mapKeys] and [mapValues], respectively.
477
479
*
478
480
* For more information, see: {@include [DocumentationUrls.Gather]}
479
481
*
@@ -536,9 +538,9 @@ public fun <T, C, K, R> Gather<T, C, K, R>.into(keyColumn: KProperty<K>, valueCo
536
538
* df.gather { cols { it.name().contains("series") } }
537
539
* .keysInto("seriesType")
538
540
* ```
539
- *
540
541
* @param keyColumn The name of the column to store keys (original column names by default).
541
542
* @return A new [DataFrame] with reshaped columns.
543
+ * @see [valuesInto]
542
544
*/
543
545
@Refine
544
546
@Interpretable(" GatherKeysInto" )
@@ -583,6 +585,7 @@ public fun <T, C, K, R> Gather<T, C, K, R>.keysInto(keyColumn: KProperty<K>): Da
583
585
*
584
586
* @param valueColumn The name of the column to store gathered values.
585
587
* @return A new [DataFrame] with reshaped columns.
588
+ * @see [keysInto]
586
589
*/
587
590
@Refine
588
591
@Interpretable(" GatherValuesInto" )
0 commit comments