Skip to content

Issue materialize data: Comparing two tables #10712

Answered by cpcloud
stb-ssk asked this question in Q&A
Discussion options

You must be logged in to vote

Is it possible to join on the unique row id, and then do a loop to compare columns from each table?

Something like this:

joined = left.join(right, on="unique_row_id")

equals = {
    f"{column}_equal": joined[column] == joined[f"{column}_right"]
    for column in left.columns
}

joined.select(**equals).to_pandas()

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@stb-ssk
Comment options

@cpcloud
Comment options

Answer selected by stb-ssk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants