Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

rowwise misses the first group and can not be printed #104

Open
holgerbrandl opened this issue Dec 23, 2020 · 0 comments
Open

rowwise misses the first group and can not be printed #104

holgerbrandl opened this issue Dec 23, 2020 · 0 comments
Assignees
Labels

Comments

@holgerbrandl
Copy link
Owner

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.
@holgerbrandl holgerbrandl self-assigned this Dec 23, 2020
@holgerbrandl holgerbrandl changed the title Can not print rowwise rowwise misses the first group and can not be printed Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant