diff --git a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Modify.kt b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Modify.kt index 889d63adf3..ed57a72f5c 100644 --- a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Modify.kt +++ b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Modify.kt @@ -536,9 +536,7 @@ class Modify : TestBase() { @TransformDataFrameExpressions fun splitRegex1() { // SampleStart - val name by column() - - merged.split { name } + merged.split { "name"() } .match("""(.*) \((.*)\)""") .inward("firstName", "lastName") // SampleEnd @@ -557,11 +555,12 @@ class Modify : TestBase() { 7, 8, 9, 10, ) - val group by columnOf(df1, df2) - val id by columnOf("x", "y") - val df = dataFrameOf(id, group) + val df = dataFrameOf( + "id" to columnOf("x", "y"), + "group" to columnOf(df1, df2) + ) - df.split { group }.intoColumns() + df.split { "group"() }.intoColumns() // SampleEnd } diff --git a/docs/StardustDocs/topics/split.md b/docs/StardustDocs/topics/split.md index 185173b6c4..1fcf839395 100644 --- a/docs/StardustDocs/topics/split.md +++ b/docs/StardustDocs/topics/split.md @@ -112,9 +112,7 @@ df.split { "name"["lastName"]() } ```kotlin -val name by column() - -merged.split { name } +merged.split { "name"() } .match("""(.*) \((.*)\)""") .inward("firstName", "lastName") ``` @@ -136,11 +134,12 @@ val df2 = dataFrameOf("a", "b")( 7, 8, 9, 10, ) -val group by columnOf(df1, df2) -val id by columnOf("x", "y") -val df = dataFrameOf(id, group) +val df = dataFrameOf( + "id" to columnOf("x", "y"), + "group" to columnOf(df1, df2) +) -df.split { group }.intoColumns() +df.split { "group"() }.intoColumns() ```