Comparison.slice_unmatched#

Comparison.slice_unmatched(table: str) DuckDBPyRelation#

Return rows from one table whose keys are missing in the other.

Parameters:
tablestr

Table identifier to return (one of table_id).

Returns:
duckdb.DuckDBPyRelation

Relation with unmatched rows from the requested table.

Examples

>>> from versus import compare, examples
>>> comparison = compare(
...     examples.example_cars_a(),
...     examples.example_cars_b(),
...     by=["car"],
... )
>>> comparison.slice_unmatched("a")
┌───────────┬──────────────┬───────┬───────┬───────┬──────────────┬──────────────┬───────┬───────┐
│    car    │     mpg      │  cyl  │ disp  │  hp   │     drat     │      wt      │  vs   │  am   │
│  varchar  │ decimal(3,1) │ int32 │ int32 │ int32 │ decimal(3,2) │ decimal(3,2) │ int32 │ int32 │
├───────────┼──────────────┼───────┼───────┼───────┼──────────────┼──────────────┼───────┼───────┤
│ Mazda RX4 │         21.0 │     6 │   160 │   110 │         3.90 │         2.62 │     0 │     1 │
└───────────┴──────────────┴───────┴───────┴───────┴──────────────┴──────────────┴───────┴───────┘