dataframe
dataframe copied to clipboard
Add GroupBy variable converter in Jupyter
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" }
I'll also check whether it influences https://github.com/Kotlin/dataframe/pull/662 or not
what needs to be done about this pr?
Rewritten but used logic as base in https://github.com/Kotlin/dataframe/pull/1263