Skip to content

How can I test if two Ibis expressions are the same? #8754

Answered by lostmygithubaccount
binste asked this question in Q&A
Discussion options

You must be logged in to vote

there is exprA.equals(exprB):

[ins] In [1]: import ibis

[ins] In [2]: t = ibis.examples.penguins.fetch()

[ins] In [3]: a = t.group_by(["species", "island"]).agg(count=t.count()).order_by("count")

[ins] In [4]: b = t.group_by(["species", "island"]).agg(count=t.count()).order_by("count")

[ins] In [5]: a.equals(b)
Out[5]: True

[ins] In [6]: a.equals(t)
Out[6]: False

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by cpcloud
Comment options

You must be logged in to vote
1 reply
@binste
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@cpcloud
Comment options

@binste
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants