Skip to content

Commit 8b4ca9e

Browse files
fixing doc
1 parent 4627c60 commit 8b4ca9e

File tree

1 file changed

+16
-8
lines changed
  • core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api

1 file changed

+16
-8
lines changed

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

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -539,20 +539,24 @@ public fun <T, C> MoveClause<T, C>.to(columnIndex: Int): DataFrame<T> = moveTo(c
539539

540540
/**
541541
* Moves columns, previously selected with [move] to a new position specified
542-
* by [columnIndex] within the column group (remaining inside the group).
542+
* by [columnIndex]. If insideGroup is true, selected columns will be moved remaining within their [ColumnGroup],
543+
* else they will be moved on top level.
543544
*
544545
* Returns a new [DataFrame] with updated columns structure.
545546
*
546547
* For more information: {@include [DocumentationUrls.Move]}
547548
*
548549
* ### Examples:
549550
* ```kotlin
550-
* df.move { age and weight }.to(0)
551-
* df.move("age", "weight").to(2)
551+
* df.move { age and weight }.to(0, true)
552+
* df.move("age", "weight").to(2, false)
552553
* ```
553554
*
554555
* @param [columnIndex] The index specifying the position in the [ColumnGroup] columns
555-
* * where the selected columns will be moved.
556+
* where the selected columns will be moved.
557+
*
558+
* @param [insideGroup] If true, selected columns will be moved remaining inside their group,
559+
* else they will be moved on top level.
556560
*/
557561
@Refine
558562
@Interpretable("MoveTo")
@@ -713,18 +717,22 @@ public fun <T, C> MoveClause<T, C>.toLeft(): DataFrame<T> = to(0)
713717
public fun <T, C> MoveClause<T, C>.toStart(): DataFrame<T> = to(0)
714718

715719
/**
716-
* Moves columns, previously selected with [move] to the start of their [ColumnGroup] (remaining inside the group).
720+
* If insideGroup is true, moves columns previously selected with [move] to the start of their [ColumnGroup].
721+
* Else, selected columns will be moved to the start of their [DataFrame] (on top-level).
717722
*
718723
* Returns a new [DataFrame] with updated columns.
719724
*
720725
* For more information: {@include [DocumentationUrls.Move]}
721726
*
722727
* ### Examples:
723728
* ```kotlin
724-
* df.move { age and weight }.toStart()
725-
* df.move { colsOf<String>() }.toStart()
726-
* df.move("age", "weight").toStart()
729+
* df.move { age and weight }.toStart(true)
730+
* df.move { colsOf<String>() }.toStart(true)
731+
* df.move("age", "weight").toStart(false)
727732
* ```
733+
*
734+
* @param [insideGroup] If true, selected columns will be moved to the start remaining inside their group,
735+
* else they will be moved to the start on top level.
728736
*/
729737
@Refine
730738
@Interpretable("MoveToStart0")

0 commit comments

Comments
 (0)