You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on an ibis livestream today and while there's a bunch of stuff to like, I noticed that if I want to apply functions to tables that I gotta do that via something like:
This works, but I worry about the elegance in the long run. In this case the function is doing a simple aggregation but what if I have a function that adds sessions and another that removes bots before I aggregate? The call might look something like this.
aggregate(remove_bots(add_session(t)))
It may even get more nesty if I have arguments to these functions as well.
I'd love to hear about any edge cases, if any. I'm totally unaware of the details in this library so I'll gladly hear it if I'm overlooking something. The typing probably needs to be considered, but to me it feels like this feature may be relatively easy to add.
What version of ibis are you running?
8.0.0
What backend(s) are you using, if any?
I tried this on DuckDB and Pandas.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
I'm working on an ibis livestream today and while there's a bunch of stuff to like, I noticed that if I want to apply functions to tables that I gotta do that via something like:
This works, but I worry about the elegance in the long run. In this case the function is doing a simple aggregation but what if I have a function that adds sessions and another that removes bots before I aggregate? The call might look something like this.
It may even get more nesty if I have arguments to these functions as well.
What I like to do instead when I write polars or pandas is to do something like this:
I was able to get something similar working in ibis via:
This is a hacky solution by all means, but at a quick glance ... it seems to pull off the trick!
What is the motivation behind your request?
This approach should allow folks to split their concerns a bit more. I should mention that I am somewhat opinionated on this. I've given a somewhat popular Python talk about this style of writing pipelines and I also introduced the
.pipe()
method in polars.It feels like something that would fit this library too and if folks don't mind ... I'll gladly have a proper stab at it.
Describe the solution you'd like
Something like this should work.
I'd love to hear about any edge cases, if any. I'm totally unaware of the details in this library so I'll gladly hear it if I'm overlooking something. The typing probably needs to be considered, but to me it feels like this feature may be relatively easy to add.
What version of ibis are you running?
8.0.0
What backend(s) are you using, if any?
I tried this on DuckDB and Pandas.
Code of Conduct
The text was updated successfully, but these errors were encountered: