-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
As with unfold()
in krangl (see https://holgerbrandl.github.io/krangl/data_model/#to-type-or-not-to-type), it would be great if kotlin-df could provide a similar API. Clearly, this could be done manually using df.add()
, but with many attributes this is very tedious. And in krangl we've seen that this can be done very efficiently via reflection.
Example (from krangl but yet missing in kdf):
data class City(val name:String, val code:Int)
data class Person(val name:String, val address:City)
val persons : List<Person> = listOf(
Person("Max", City("Dresden", 12309)),
Person("Anna", City("Berlin", 10115))
)
val personsDF: DataFrame = persons.asDataFrame() // <- Also sems missing API in kdf?
// unfold City attributes into different columns
personsDF.unfold<City>("address") // <- Missing API in kdf
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request