Hi @nathaneastwood, I rewrote the pivot_ functions in {datawizard} to use stack() and unstack() instead of reshape(), as suggested by @grantmcdermott in #48. This comes with important performance gains, especially with large datasets (a few million rows).
I will probably make a PR here to implement this but I open this issue first just in case I forget about this and someone else wants to do it.
Edit: there were several fixes to make in the original implementation in the PR I linked to. It's better to rely on the functions in the main branch of datawizard rather than on the code in the PR.
Hi @nathaneastwood, I rewrote the
pivot_
functions in{datawizard}
to usestack()
andunstack()
instead ofreshape()
, as suggested by @grantmcdermott in #48. This comes with important performance gains, especially with large datasets (a few million rows).All code and benchmarks are in this PR: https://github.com/easystats/datawizard/pull/285
I will probably make a PR here to implement this but I open this issue first just in case I forget about this and someone else wants to do it.
Edit: there were several fixes to make in the original implementation in the PR I linked to. It's better to rely on the functions in the main branch of datawizard rather than on the code in the PR.