Closed fhg-isi closed 5 months ago
Plotnine, like it's API donor ggplot2, is indeed requiring your data in long format.
Pandas.melt would be the way to go for most data sets - I personally don't see value in wrapping this operation in yet another level of abstraction / nomenclature (fold vs melt).
Thank you for clarification.
Altair provides some transformations to work with data that is not in long format: https://altair-viz.github.io/user_guide/data.html#converting-with-fold-transform
=> Does plotnine provide similar features? Or do I have to pre-process my data, (for example with pd.melt(...) ) to be able to use plotnine?
Related:
https://stackoverflow.com/questions/77993663/how-to-create-stacked-bar-chart-from-different-data-format-with-altair-in-python