diff --git a/docs/StardustDocs/topics/ColumnSelectors.md b/docs/StardustDocs/topics/ColumnSelectors.md index d6b74a4b4..e9c60385f 100644 --- a/docs/StardustDocs/topics/ColumnSelectors.md +++ b/docs/StardustDocs/topics/ColumnSelectors.md @@ -150,7 +150,7 @@ df.select { cols(1..4) } ```kotlin // by condition -df.select { cols { it.name.startsWith("year") } } +df.select { cols { it.name().startsWith("year") } } df.select { startsWith("year") } // by type @@ -177,7 +177,7 @@ df.select { allDfs() } df.select { allDfs(includeGroups = true) } // dfs traversal with condition -df.select { dfs { it.name.contains(":") } } +df.select { dfs { it.name().contains(":") } } // dfs traversal of columns of given type df.select { dfsOf() } @@ -205,7 +205,7 @@ df.select { allDfs().drop(3) } df.select { allDfs().dropLast(3) } // filter column set by condition -df.select { allDfs().filter { it.name.startsWith("year") } } +df.select { allDfs().filter { it.name().startsWith("year") } } // exclude columns from column set df.select { allDfs().except { age } } diff --git a/docs/StardustDocs/topics/createDataFrame.md b/docs/StardustDocs/topics/createDataFrame.md index 9f1f034c4..94ccad577 100644 --- a/docs/StardustDocs/topics/createDataFrame.md +++ b/docs/StardustDocs/topics/createDataFrame.md @@ -128,6 +128,7 @@ map.toDataFrame() ```kotlin data class Person(val name: String, val age: Int) + val persons = listOf(Person("Alice", 15), Person("Bob", 20), Person("Charlie", 22)) val df = persons.toDataFrame() diff --git a/docs/StardustDocs/topics/move.md b/docs/StardustDocs/topics/move.md index d8b5eef1e..7bc89720b 100644 --- a/docs/StardustDocs/topics/move.md +++ b/docs/StardustDocs/topics/move.md @@ -24,18 +24,18 @@ df.move { weight }.to(1) // age -> info.age // weight -> info.weight -df.move { age and weight }.into { pathOf("info", it.name) } -df.move { age and weight }.into { "info"[it.name] } +df.move { age and weight }.into { pathOf("info", it.name()) } +df.move { age and weight }.into { "info"[it.name()] } df.move { age and weight }.under("info") // name.firstName -> fullName.first // name.lastName -> fullName.last -df.move { name.firstName and name.lastName }.into { pathOf("fullName", it.name.dropLast(4)) } +df.move { name.firstName and name.lastName }.into { pathOf("fullName", it.name().dropLast(4)) } // a|b|c -> a.b.c // a|d|e -> a.d.e dataFrameOf("a|b|c", "a|d|e")(0, 0) - .move { all() }.into { it.name.split("|").toPath() } + .move { all() }.into { it.name().split("|").toPath() } // name.firstName -> firstName // name.lastName -> lastName @@ -43,7 +43,7 @@ df.move { name.cols() }.toTop() // a.b.e -> be // c.d.e -> de -df.move { dfs { it.name == "e" } }.toTop { it.parent!!.name + it.name } +df.move { dfs { it.name() == "e" } }.toTop { it.parent!!.name() + it.name() } ```