Allow custom Parsers
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
Allowing users to set custom parsers would be very helpful. It could allow them things like:
```kt
class User(val name: String, val age: Int) {
override fun toString() = "user-$name-$age"
}
DataFrame.parser.addCustomParser {
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.
Contributor guide
Research direction
The issue names DataFrame.parser.addCustomParser and DataFrame.readCsv, but no files or tests. Start by tracing those entry points and the existing convert behavior. Done should allow custom User and enum values to be parsed directly from CSV without a separate convert step.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100