rowwise misses the first group and can not be printed
holgerbrandl opened this issue · 0 comments
holgerbrandl commented
Example
val lambdas = (1..3).map { 0.25 }.cumSum()
val mus = (1..3).map { 0.25 }.cumSum()
fun <A, B> cartesianProduct(
listA: Iterable<A>,
listB: Iterable<B>
): Sequence<Pair<A, B>> =
sequence {
listA.forEach { a ->
listB.forEach { b ->
yield(a to b)
}
}
}
cartesianProduct(lambdas, mus).map { mapOf("lambda" to it.first, "mu" to it.second) }
var df = dataFrameOf(cartesianProduct(lambdas, mus).map { mapOf("lambda" to it.first, "mu" to it.second) }.asIterable())
df.print()
df.rowwise().print()
```
This fails with IllegalArgumentException.