String API
String column names are the easiest way to access data in DataFrame
:
DataFrame.read("titanic.csv")
.add("lastName") { "name"<String>().split(",").last() }
.dropNulls("age")
.filter {
"survived"<Boolean>() &&
"home"<String>().endsWith("NY") &&
"age"<Int>() in 10..20
}
The titanic.csv
file could be found here.
Last modified: 09 December 2024