Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,7 @@ class Modify : TestBase() {
@TransformDataFrameExpressions
fun splitRegex1() {
// SampleStart
val name by column<String>()

merged.split { name }
merged.split { "name"<String>() }
.match("""(.*) \((.*)\)""")
.inward("firstName", "lastName")
// SampleEnd
Expand All @@ -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"<AnyFrame>() }.intoColumns()
// SampleEnd
}

Expand Down
13 changes: 6 additions & 7 deletions docs/StardustDocs/topics/split.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ df.split { "name"["lastName"]<String>() }
<!---FUN splitRegex1-->

```kotlin
val name by column<String>()

merged.split { name }
merged.split { "name"<String>() }
.match("""(.*) \((.*)\)""")
.inward("firstName", "lastName")
```
Expand All @@ -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"<AnyFrame>() }.intoColumns()
```

<!---END-->
Expand Down