Extending ibis with higher level abstractions #5468
Replies: 2 comments 5 replies
-
Hey @thegreymatter! Great to hear that you're enjoying the library. We've been going gangbusters in a few different areas so it's very gratifying to see that you were able to get things done and also were able to build some extensions. I'll just jump right in:
Not specifically, but if there's a natural
One lightweight approach might be to leverage the
This allows you to keep the method chaining UX (mostly!) while not having to add a ton of methods. In that case, we could potentially define an |
Beta Was this translation helpful? Give feedback.
-
This is an important discussion, thanks for starting it! Here are my opinions, not sure how unpopular these are. Please comment if you agree/disagree! Direct methods (eg Table.to_onehot(), Table.merge_timeframes())I think this is great for very common operations (eg pivot() and dedup(). These are now core methods in ibis, which I think is great!), but I don't like obscure or domain-specific ones polluting the namespace (eg merge_timeframes(), to_onehot()). Maybe the guiding principle is the function needs to be used by > 5% of people/usecases for it to be included? IDK exactly. Namespaced methods (eg Table.time.merge_timeframes(), Table.ml.to_onehot())I don't like these magic accesses, and I don't think they should ever be used. Is These also don't play well with typing, autocomplete, IDEs, etc This could be acceptable if the namespace is builtin, eg if ibis ships with Direct functions (eg merge_timeframes(Table), onehot(Table))This doesn't allow for the method chaining, but I think the directness and unambiguity is worth it for any 3rd party extensions. Using |
Beta Was this translation helpful? Give feedback.
-
I've bee working with ibis in the last few weeks for several workflows and was very impressed. as part of my work i've developed several "common" utility functions that leverage ibis base expressions.
just few examples -
pivot, one hot encoding (i.e pandas get_dummies), winsorizing , merge overlaps in time series, gaps&islands in time series e.t.c.
The common theme here is that all of these expressions are syntactic-sugar of a more complex expression that can be written manually as ibis expressions. (even though some backends have direct implementation for them)
I would be happy to hear your thoughts about the how such capabilities play with the core framework.
Beta Was this translation helpful? Give feedback.
All reactions