File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ class Modify : TestBase() {
223
223
@TransformDataFrameExpressions
224
224
fun convertToValueClass () {
225
225
// SampleStart
226
- dataFrameOf(" value" )(" 1" , " 2" )
226
+ dataFrameOf(" value" )(" 1" , " 2" ) // note that values are strings; conversion is done automatically
227
227
.convert(" value" ).to<IntClass >()
228
228
// SampleEnd
229
229
}
Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ dataFrameOf("direction")("NORTH", "WEST")
81
81
<dataFrame src =" org.jetbrains.kotlinx.dataframe.samples.api.Modify.convertToEnum.html " />
82
82
<!-- -END-->
83
83
84
- And finally, [ Value classes] ( https://kotlinlang.org/docs/inline-classes.html ) can be created
85
- and unpacked using ` convert ` :
84
+ And finally, [ Value classes] ( https://kotlinlang.org/docs/inline-classes.html ) can be used with ` convert ` too.
85
+ Both as conversion source and target :
86
86
87
87
``` kotlin
88
88
@JvmInline
@@ -92,7 +92,7 @@ value class IntClass(val value: Int)
92
92
<!-- -FUN convertToValueClass-->
93
93
94
94
``` kotlin
95
- dataFrameOf(" value" )(" 1" , " 2" )
95
+ dataFrameOf(" value" )(" 1" , " 2" ) // note that values are strings; conversion is done automatically
96
96
.convert(" value" ).to<IntClass >()
97
97
```
98
98
You can’t perform that action at this time.
0 commit comments