-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC use polars in plot_digits_pipe example #28576
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
Conversation
Hi @MarcoGorelli, thanks for the PR :) Though I agree that we can change some examples to use polars, maybe this particular example doesn't really show an advantage with respect to using pandas. Instead we can address #28341 (comment), where @glemaitre mentions that time lagged feature engineering seems to be a more natural place to introduce polars. |
Thanks @ArturoAmorQ for your review! The advantage I was thinking of here is that Polars is strict about dtypes, unlike pandas doesn't let you do arithmetic on This has since been addressed (#28345, #28571, #28352) but my point is that it was by trying to use Polars that the issue came up and was resolved - so here the advantage isn't in speed or memory usage, but strictness Anyway, happy to close if you think the |
I was actually happy with this PR. I think it's worth the change, I just need to dig into the changed code a bit. |
Just to be clear, I am not against this PR. If @adrinjalali is happy with it, then maybe we can highlight the benefit with a comment in the code or as narrative text. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the semantics here, since it's weird to group by a column and then include other non-aggregated columns in the result in the first place. Thanks @MarcoGorelli
Reference Issues/PRs
Related to #28341 - if you want to diversify your examples to show a bit of pandas and a bit of Polars, then this one might be a good one to use Polars in?
What does this implement/fix? Explain your changes.
Any other comments?