Replies: 1 comment 11 replies
-
I think I've narrowed down the issue to dynamic lookup using expressions inside import ibis
u = ibis.memtable({"id": [1, 2, 3]})
a = ibis.memtable({"id": [1, 2]})
b = ibis.memtable({"id": [2, 3]})
tables = {"a": a, "b": b}
for name, t in tables.items():
u = u.mutate(**{f"in_{name}": u["id"].isin(t["id"])})
print(u)
But setting backed to import ibis
ibis.set_backend("polars")
u = ibis.memtable({"id": [1, 2, 3]})
a = ibis.memtable({"id": [1, 2]})
b = ibis.memtable({"id": [2, 3]})
tables = {"a": a, "b": b}
for name, t in tables.items():
u = u.mutate(**{f"in_{name}": u["id"].isin(t["id"])})
|
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Given a set of tables
a, b, ...
with the same column nameid
, my goal is to create a new table with a columnid
containing all possibleid
values and for each table a boolean columnin_a, in_b, ...
containingtrue
if the specific table also has the specificid
value. Sample code:However, changing the argument to
isin
to be static, e.g.gives the right answer. Wondering if this is expected behaviour or a bug?
Beta Was this translation helpful? Give feedback.
All reactions