Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polars support #602

Open
brechtmann opened this issue Jun 28, 2022 · 4 comments
Open

Polars support #602

brechtmann opened this issue Jun 28, 2022 · 4 comments

Comments

@brechtmann
Copy link

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('...'))
@TyberiusPrime
Copy link
Contributor

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.

@has2k1
Copy link
Owner

has2k1 commented Sep 13, 2022

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!

@zykezero
Copy link

Was this update put in? I was using polars with plotnine and I didn't encounter an error.

@Hoeze
Copy link

Hoeze commented Mar 14, 2023

You will likely run into errors with missing data because Polars has first-class nullable types support, while Plotnine does not understand these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants