-
When working with file-backed data (CSV, JSON, parquet...), the positional ordering of records might be meaningful and shared by different files.
I am wondering if such a concept exists the Ibis backend-agnostic public API. If not, it's always possible to mutate the table expressions to add a join key with |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Replying to myself, for the simple case where you only need to concatenate columns that stem from the same source, a combination of named deferred expressions and import ibis
from ibis import _
data = ibis.memtable({"a": range(5)})
b = (_.a + 1).name("b")
c = (_.a + 2).name("c")
data.select(b, c) However, assume that would like to concatenate with a third column that results from a left outer join from an ancillary table, then I don't know how to do this with Ibis. |
Beta Was this translation helpful? Give feedback.
-
Hey @ogrisel -- we do not currently have any IR support for the concept of positional joins in Ibis. It's not a commonly supported operation in relational databases, so I think it hasn't come up. We could add support, probably as an option to the |
Beta Was this translation helpful? Give feedback.
-
This is now possible with a few of the in-memory backends using
|
Beta Was this translation helpful? Give feedback.
This is now possible with a few of the in-memory backends using
how="positional"
with joins. Here's DuckDB: