-
Notifications
You must be signed in to change notification settings - Fork 79
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
blog: add the v0.15.0 release post #568
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #568 +/- ##
=======================================
Coverage 90.67% 90.67%
=======================================
Files 46 46
Lines 5381 5381
=======================================
Hits 4879 4879
Misses 502 502 ☔ View full report in Codecov by Sentry. |
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.
Looks great, I left some quick thoughts on shortening polars code, but feel free to ignore!
peeps_mini = ( | ||
pl.from_pandas(peeps) | ||
.filter(pl.col("dob").str.slice(offset=0, length=4) == "1988") | ||
.with_columns(name=pl.concat_str(pl.col("name_given") + " " + pl.col("name_family"))) |
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 think you can remove the pl.concat_str()
call here
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.
Done, thanks!
pl.from_pandas(films) | ||
.filter(pl.col("director") == "Michael Haneke") | ||
.with_columns( | ||
title=pl.concat_str(pl.col("title") + " (" + pl.col("year").cast(pl.String) + ")") |
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.
Can remove concat_str()
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.
Now changed.
.tail(10) | ||
.with_columns( | ||
lines=pl.lit("train"), | ||
connect_tramway = ( |
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 would define the services column here, instead of separately below. (So replace connect_tramway =
with services=
)
Something like removing the need for lines=
, and just using...
.with_columns(
services = (
pl.when(pl.col("connect_tramway").is_not_null())
.then(pl.lit("train, train-tram"))
.otherwise("train")
)
)
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.
Great idea. Now fixed!
Thanks for the great suggestions on improving the Polars code. Will fix up all of these shortly! |
This post is a smooth read! |
This adds the blog post for the v0.15.0 release of the package.