Skip to content

Commit a744649

Browse files
committed
korro
1 parent 9bcd368 commit a744649

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

docs/StardustDocs/topics/add.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ columnMapping = column into columnName | columnName from column | columnName fro
6262
df.add {
6363
"year of birth" from 2021 - age
6464
age gt 18 into "is adult"
65-
name.lastName.length() into "last name length"
66-
"full name" from { name.firstName + " " + name.lastName }
65+
"details" {
66+
name.lastName.length() into "last name length"
67+
"full name" from { name.firstName + " " + name.lastName }
68+
}
6769
}
6870
```
6971

@@ -77,14 +79,17 @@ val age by column<Int>()
7779
val isAdult = column<Boolean>("is adult")
7880
val fullName = column<String>("full name")
7981
val name by columnGroup()
82+
val details by columnGroup()
8083
val firstName by name.column<String>()
8184
val lastName by name.column<String>()
8285

8386
df.add {
8487
yob from 2021 - age
8588
age gt 18 into isAdult
86-
lastName.length() into lastNameLength
87-
fullName from { firstName() + " " + lastName() }
89+
details from {
90+
lastName.length() into lastNameLength
91+
fullName from { firstName() + " " + lastName() }
92+
}
8893
}
8994
```
9095

@@ -95,8 +100,10 @@ df.add {
95100
df.add {
96101
"year of birth" from 2021 - "age"<Int>()
97102
"age"<Int>() gt 18 into "is adult"
98-
"name"["lastName"]<String>().length() into "last name length"
99-
"full name" from { "name"["firstName"]<String>() + " " + "name"["lastName"]<String>() }
103+
"details" {
104+
"name"["lastName"]<String>().length() into "last name length"
105+
"full name" from { "name"["firstName"]<String>() + " " + "name"["lastName"]<String>() }
106+
}
100107
}
101108
```
102109

docs/StardustDocs/topics/read.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ You can fix it using convert:
162162

163163
```kotlin
164164
val df = dataFrameOf("IDS")(100.0, "A100", "B100", "C100")
165-
val df1 = df.convert("IDS").with(inferType = true) {
165+
val df1 = df.convert("IDS").with(Infer.Type) {
166166
if (it is Double) {
167167
it.toLong().toString()
168168
} else {

docs/StardustDocs/topics/schemas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ After loading this library into Jupyter notebook, schema interfaces for all `Dat
187187
```kotlin
188188
val df = dataFrameOf("name", "age")(
189189
"Alice", 15,
190-
"Bob", null
190+
"Bob", 20
191191
)
192192
```
193193

0 commit comments

Comments
 (0)