plotnine
plotnine copied to clipboard
Polars support
Polars https://www.pola.rs/ is a nice data frame library for python.
It would be great if plotnine would also support polars instead of pandas data frames.
My current workaround is:
plotnine.ggplot(polars_df.to_pandas(), plotnine.aes('...'))
I suppose the sensible way here would be to check if it has a 'to_pandas' (or even a to_frame()?) method, and then convert it - I don't think plotnine should require polars support just to check for it's classes.
polars is the future but there are still some way to go before it is viable for first class support. Though in the next release you will not have to do df.to_pandas
; baby steps!
Was this update put in? I was using polars with plotnine and I didn't encounter an error.
You will likely run into errors with missing data because Polars has first-class nullable types support, while Plotnine does not understand these.