Allowing users to set custom parsers would be very helpful. It could allow them things like:
class User(val name: String, val age: Int) {
override fun toString() = "user-$name-$age"
}
DataFrame.parser.addCustomParser<User> {
if (it.startsWith("user")) {
val (_, name, age) = it.split("-")
User(name, age)
} else null
}
DataFrame.readCsv(myCustomUserData)
or we could even add an enum-specific variant. This can only be done with convert at the moment. It could allow immediate parsing of CSV -> enum for instance.
Allowing users to set custom parsers would be very helpful. It could allow them things like:
or we could even add an enum-specific variant. This can only be done with
convertat the moment. It could allow immediate parsing of CSV -> enum for instance.