Numeric Comparisons
Perform comparisons of values in columns to fixed values.
Pointblank Validation |
2025-01-20|18:17:52Polars |
|
|
STEP |
COLUMNS |
VALUES |
TBL |
EVAL |
UNITS |
PASS |
FAIL |
W |
S |
N |
EXT |
#4CA64C66 |
1 |
col_vals_gt()
|
d |
1000 |
|
✓ |
13 |
7 0.54 |
6 0.46 |
— |
— |
— |
|
#4CA64C |
2 |
col_vals_lt()
|
d |
10000 |
|
✓ |
13 |
13 1.00 |
0 0.00 |
— |
— |
— |
— |
#4CA64C |
3 |
col_vals_ge()
|
a |
1 |
|
✓ |
13 |
13 1.00 |
0 0.00 |
— |
— |
— |
— |
#4CA64C66 |
4 |
col_vals_le()
|
c |
5 |
|
✓ |
13 |
5 0.38 |
6 0.46 |
— |
— |
— |
|
#4CA64C66 |
5 |
col_vals_ne()
|
a |
7 |
|
✓ |
13 |
12 0.92 |
1 0.08 |
— |
— |
— |
|
#4CA64C66 |
6 |
col_vals_between()
|
c |
[0, 15] |
|
✓ |
13 |
11 0.85 |
0 0.00 |
— |
— |
— |
— |
2025-01-20 18:17:52 UTC< 1 s2025-01-20 18:17:52 UTC |
import pointblank as pb
validation = (
pb.Validate(
data=pb.load_dataset(dataset="small_table", tbl_type="polars")
)
.col_vals_gt(columns="d", value=1000) # values in 'd' > 1000
.col_vals_lt(columns="d", value=10000) # values in 'd' < 10000
.col_vals_ge(columns="a", value=1) # values in 'a' >= 1
.col_vals_le(columns="c", value=5) # values in 'c' <= 5
.col_vals_ne(columns="a", value=7) # values in 'a' not equal to 7
.col_vals_between(columns="c", left=0, right=15) # 0 <= 'c' values <= 15
.interrogate()
)
validation
Preview of Input Table
|
|
|
|
|
|
|
|
|
|
1 |
2016-01-04 11:00:00 |
2016-01-04 |
2 |
1-bcd-345 |
3 |
3423.29 |
True |
high |
2 |
2016-01-04 00:32:00 |
2016-01-04 |
3 |
5-egh-163 |
8 |
9999.99 |
True |
low |
3 |
2016-01-05 13:32:00 |
2016-01-05 |
6 |
8-kdg-938 |
3 |
2343.23 |
True |
high |
4 |
2016-01-06 17:23:00 |
2016-01-06 |
2 |
5-jdo-903 |
None |
3892.4 |
False |
mid |
5 |
2016-01-09 12:36:00 |
2016-01-09 |
8 |
3-ldm-038 |
7 |
283.94 |
True |
low |
6 |
2016-01-11 06:15:00 |
2016-01-11 |
4 |
2-dhe-923 |
4 |
3291.03 |
True |
mid |
7 |
2016-01-15 18:46:00 |
2016-01-15 |
7 |
1-knw-093 |
3 |
843.34 |
True |
high |
8 |
2016-01-17 11:27:00 |
2016-01-17 |
4 |
5-boe-639 |
2 |
1035.64 |
False |
low |
9 |
2016-01-20 04:30:00 |
2016-01-20 |
3 |
5-bce-642 |
9 |
837.93 |
False |
high |
10 |
2016-01-20 04:30:00 |
2016-01-20 |
3 |
5-bce-642 |
9 |
837.93 |
False |
high |
11 |
2016-01-26 20:07:00 |
2016-01-26 |
4 |
2-dmx-010 |
7 |
833.98 |
True |
low |
12 |
2016-01-28 02:51:00 |
2016-01-28 |
2 |
7-dmx-010 |
8 |
108.34 |
False |
low |
13 |
2016-01-30 11:23:00 |
2016-01-30 |
1 |
3-dka-303 |
None |
2230.09 |
True |
high |