Kotlin / dataframe

Structured data processing in Kotlin
https://kotlin.github.io/dataframe/overview.html
Apache License 2.0
763 stars 48 forks source link

Add GroupBy variable converter in Jupyter #663

Open koperagen opened 2 months ago

koperagen commented 2 months ago

This was a long standing minor inconvenience. Having this variable in a cell1 you couldn't access k in keys in the cell2 cell1:

val groupBy = dataFrameOf("a")("1", "11", "2", "22").groupBy { expr { "a"<String>().length } named "k" }

cell2:

groupBy.keys.k

Other use case is adding a new column to GroupBy

val groupBy = dataFrameOf("a")("1", "11", "2", "22").groupBy { expr { "a"<String>().length } named "k" }.add("newCol") { 42 }
groupBy.aggregate { newCol into "newCol" }
Jolanrensen commented 1 month ago

I'll also check whether it influences https://github.com/Kotlin/dataframe/pull/662 or not