Comparison Checks Across Columns
Perform comparisons of values in columns to values in other columns.
import pointblank as pb
validation = (
pb.Validate(
data=pb.load_dataset(dataset="small_table", tbl_type="polars")
)
.col_vals_lt(columns="a", value=pb.col("c")) # values in 'a' > values in 'c'
.col_vals_between(
columns="d", # values in 'd' are between values
left=pb.col("c"), # in 'c' and the fixed value of 12,000;
right=12000, # any missing values encountered result
na_pass=True # in a passing test unit
)
.interrogate()
)
validationPreview of Input Table
PolarsRows13Columns8 |
||||||||