pointblank 0.16.0__py3-none-any.whl → 0.18.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pointblank/__init__.py +2 -0
- pointblank/_agg.py +120 -0
- pointblank/_constants.py +207 -6
- pointblank/_constants_translations.py +1302 -0
- pointblank/_datascan_utils.py +28 -10
- pointblank/_interrogation.py +216 -139
- pointblank/_typing.py +12 -0
- pointblank/_utils.py +81 -44
- pointblank/_utils_ai.py +4 -5
- pointblank/_utils_check_args.py +3 -3
- pointblank/_utils_llms_txt.py +41 -2
- pointblank/actions.py +1 -1
- pointblank/assistant.py +2 -3
- pointblank/cli.py +1 -1
- pointblank/column.py +162 -46
- pointblank/data/api-docs.txt +2957 -50
- pointblank/datascan.py +17 -17
- pointblank/draft.py +2 -3
- pointblank/scan_profile.py +2 -1
- pointblank/schema.py +61 -20
- pointblank/thresholds.py +15 -13
- pointblank/validate.py +2280 -410
- pointblank/validate.pyi +1104 -0
- pointblank/yaml.py +15 -8
- {pointblank-0.16.0.dist-info → pointblank-0.18.0.dist-info}/METADATA +7 -2
- {pointblank-0.16.0.dist-info → pointblank-0.18.0.dist-info}/RECORD +30 -28
- {pointblank-0.16.0.dist-info → pointblank-0.18.0.dist-info}/licenses/LICENSE +1 -1
- {pointblank-0.16.0.dist-info → pointblank-0.18.0.dist-info}/WHEEL +0 -0
- {pointblank-0.16.0.dist-info → pointblank-0.18.0.dist-info}/entry_points.txt +0 -0
- {pointblank-0.16.0.dist-info → pointblank-0.18.0.dist-info}/top_level.txt +0 -0
pointblank/validate.pyi
ADDED
|
@@ -0,0 +1,1104 @@
|
|
|
1
|
+
from pointblank import Actions, Thresholds
|
|
2
|
+
from pointblank._utils import _PBUnresolvedColumn
|
|
3
|
+
from pointblank.column import Column, ReferenceColumn
|
|
4
|
+
from pointblank._typing import Tolerance
|
|
5
|
+
|
|
6
|
+
from collections.abc import Collection
|
|
7
|
+
from dataclasses import dataclass
|
|
8
|
+
from great_tables import GT
|
|
9
|
+
from narwhals.typing import FrameT, IntoFrame
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from pointblank._typing import SegmentSpec, Tolerance
|
|
12
|
+
from pointblank._utils import _PBUnresolvedColumn
|
|
13
|
+
from pointblank.column import Column, ColumnSelector, ColumnSelectorNarwhals, ReferenceColumn
|
|
14
|
+
from pointblank.schema import Schema
|
|
15
|
+
from pointblank.thresholds import Actions, FinalActions, Thresholds
|
|
16
|
+
from typing import Any, Callable, Literal, ParamSpec, TypeVar
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"Validate",
|
|
20
|
+
"load_dataset",
|
|
21
|
+
"read_file",
|
|
22
|
+
"write_file",
|
|
23
|
+
"config",
|
|
24
|
+
"connect_to_table",
|
|
25
|
+
"print_database_tables",
|
|
26
|
+
"preview",
|
|
27
|
+
"missing_vals_tbl",
|
|
28
|
+
"get_action_metadata",
|
|
29
|
+
"get_column_count",
|
|
30
|
+
"get_data_path",
|
|
31
|
+
"get_row_count",
|
|
32
|
+
"get_validation_summary",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
P = ParamSpec("P")
|
|
36
|
+
R = TypeVar("R")
|
|
37
|
+
|
|
38
|
+
def get_action_metadata() -> dict | None: ...
|
|
39
|
+
def get_validation_summary() -> dict | None: ...
|
|
40
|
+
@dataclass
|
|
41
|
+
class PointblankConfig:
|
|
42
|
+
report_incl_header: bool = ...
|
|
43
|
+
report_incl_footer: bool = ...
|
|
44
|
+
report_incl_footer_timings: bool = ...
|
|
45
|
+
report_incl_footer_notes: bool = ...
|
|
46
|
+
preview_incl_header: bool = ...
|
|
47
|
+
def __repr__(self) -> str: ...
|
|
48
|
+
|
|
49
|
+
def config(
|
|
50
|
+
report_incl_header: bool = True,
|
|
51
|
+
report_incl_footer: bool = True,
|
|
52
|
+
report_incl_footer_timings: bool = True,
|
|
53
|
+
report_incl_footer_notes: bool = True,
|
|
54
|
+
preview_incl_header: bool = True,
|
|
55
|
+
) -> PointblankConfig: ...
|
|
56
|
+
def load_dataset(
|
|
57
|
+
dataset: Literal["small_table", "game_revenue", "nycflights", "global_sales"] = "small_table",
|
|
58
|
+
tbl_type: Literal["polars", "pandas", "duckdb"] = "polars",
|
|
59
|
+
) -> FrameT | Any: ...
|
|
60
|
+
def read_file(filepath: str | Path) -> Validate: ...
|
|
61
|
+
def write_file(
|
|
62
|
+
validation: Validate,
|
|
63
|
+
filename: str,
|
|
64
|
+
path: str | None = None,
|
|
65
|
+
keep_tbl: bool = False,
|
|
66
|
+
keep_extracts: bool = False,
|
|
67
|
+
quiet: bool = False,
|
|
68
|
+
) -> None: ...
|
|
69
|
+
def get_data_path(
|
|
70
|
+
dataset: Literal["small_table", "game_revenue", "nycflights", "global_sales"] = "small_table",
|
|
71
|
+
file_type: Literal["csv", "parquet", "duckdb"] = "csv",
|
|
72
|
+
) -> str: ...
|
|
73
|
+
def preview(
|
|
74
|
+
data: FrameT | Any,
|
|
75
|
+
columns_subset: str | list[str] | Column | None = None,
|
|
76
|
+
n_head: int = 5,
|
|
77
|
+
n_tail: int = 5,
|
|
78
|
+
limit: int = 50,
|
|
79
|
+
show_row_numbers: bool = True,
|
|
80
|
+
max_col_width: int = 250,
|
|
81
|
+
min_tbl_width: int = 500,
|
|
82
|
+
incl_header: bool = None,
|
|
83
|
+
) -> GT: ...
|
|
84
|
+
def missing_vals_tbl(data: FrameT | Any) -> GT: ...
|
|
85
|
+
def get_column_count(data: FrameT | Any) -> int: ...
|
|
86
|
+
def get_row_count(data: FrameT | Any) -> int: ...
|
|
87
|
+
@dataclass
|
|
88
|
+
class _ValidationInfo:
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_agg_validator(
|
|
91
|
+
cls,
|
|
92
|
+
assertion_type: str,
|
|
93
|
+
columns: _PBUnresolvedColumn,
|
|
94
|
+
value: float | Column | ReferenceColumn,
|
|
95
|
+
tol: Tolerance = 0,
|
|
96
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
97
|
+
brief: str | bool = False,
|
|
98
|
+
actions: Actions | None = None,
|
|
99
|
+
active: bool = True,
|
|
100
|
+
) -> _ValidationInfo: ...
|
|
101
|
+
i: int | None = ...
|
|
102
|
+
i_o: int | None = ...
|
|
103
|
+
step_id: str | None = ...
|
|
104
|
+
sha1: str | None = ...
|
|
105
|
+
assertion_type: str | None = ...
|
|
106
|
+
column: Any | None = ...
|
|
107
|
+
values: Any | list[any] | tuple | None = ...
|
|
108
|
+
inclusive: tuple[bool, bool] | None = ...
|
|
109
|
+
na_pass: bool | None = ...
|
|
110
|
+
pre: Callable | None = ...
|
|
111
|
+
segments: Any | None = ...
|
|
112
|
+
thresholds: Thresholds | None = ...
|
|
113
|
+
actions: Actions | None = ...
|
|
114
|
+
label: str | None = ...
|
|
115
|
+
brief: str | None = ...
|
|
116
|
+
autobrief: str | None = ...
|
|
117
|
+
active: bool | None = ...
|
|
118
|
+
eval_error: bool | None = ...
|
|
119
|
+
all_passed: bool | None = ...
|
|
120
|
+
n: int | None = ...
|
|
121
|
+
n_passed: int | None = ...
|
|
122
|
+
n_failed: int | None = ...
|
|
123
|
+
f_passed: int | None = ...
|
|
124
|
+
f_failed: int | None = ...
|
|
125
|
+
warning: bool | None = ...
|
|
126
|
+
error: bool | None = ...
|
|
127
|
+
critical: bool | None = ...
|
|
128
|
+
failure_text: str | None = ...
|
|
129
|
+
tbl_checked: FrameT | None = ...
|
|
130
|
+
extract: FrameT | None = ...
|
|
131
|
+
val_info: dict[str, any] | None = ...
|
|
132
|
+
time_processed: str | None = ...
|
|
133
|
+
proc_duration_s: float | None = ...
|
|
134
|
+
notes: dict[str, dict[str, str]] | None = ...
|
|
135
|
+
def get_val_info(self) -> dict[str, any]: ...
|
|
136
|
+
def _add_note(self, key: str, markdown: str, text: str | None = None) -> None: ...
|
|
137
|
+
def _get_notes(self, format: str = "dict") -> dict[str, dict[str, str]] | list[str] | None: ...
|
|
138
|
+
def _get_note(self, key: str, format: str = "dict") -> dict[str, str] | str | None: ...
|
|
139
|
+
def _has_notes(self) -> bool: ...
|
|
140
|
+
|
|
141
|
+
def connect_to_table(connection_string: str) -> Any: ...
|
|
142
|
+
def print_database_tables(connection_string: str) -> list[str]: ...
|
|
143
|
+
@dataclass
|
|
144
|
+
class Validate:
|
|
145
|
+
data: FrameT | Any
|
|
146
|
+
reference: IntoFrame | None = ...
|
|
147
|
+
tbl_name: str | None = ...
|
|
148
|
+
label: str | None = ...
|
|
149
|
+
thresholds: int | float | bool | tuple | dict | Thresholds | None = ...
|
|
150
|
+
actions: Actions | None = ...
|
|
151
|
+
final_actions: FinalActions | None = ...
|
|
152
|
+
brief: str | bool | None = ...
|
|
153
|
+
lang: str | None = ...
|
|
154
|
+
locale: str | None = ...
|
|
155
|
+
col_names = ...
|
|
156
|
+
col_types = ...
|
|
157
|
+
time_start = ...
|
|
158
|
+
time_end = ...
|
|
159
|
+
validation_info = ...
|
|
160
|
+
def __post_init__(self) -> None: ...
|
|
161
|
+
def _add_agg_validation(
|
|
162
|
+
self,
|
|
163
|
+
*,
|
|
164
|
+
assertion_type: str,
|
|
165
|
+
columns: str | Collection[str],
|
|
166
|
+
value,
|
|
167
|
+
tol: int = 0,
|
|
168
|
+
thresholds=None,
|
|
169
|
+
brief: bool = False,
|
|
170
|
+
actions=None,
|
|
171
|
+
active: bool = True,
|
|
172
|
+
): ...
|
|
173
|
+
def set_tbl(
|
|
174
|
+
self, tbl: FrameT | Any, tbl_name: str | None = None, label: str | None = None
|
|
175
|
+
) -> Validate: ...
|
|
176
|
+
def _repr_html_(self) -> str: ...
|
|
177
|
+
def col_vals_gt(
|
|
178
|
+
self,
|
|
179
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
180
|
+
value: float | int | Column,
|
|
181
|
+
na_pass: bool = False,
|
|
182
|
+
pre: Callable | None = None,
|
|
183
|
+
segments: SegmentSpec | None = None,
|
|
184
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
185
|
+
actions: Actions | None = None,
|
|
186
|
+
brief: str | bool | None = None,
|
|
187
|
+
active: bool = True,
|
|
188
|
+
) -> Validate: ...
|
|
189
|
+
def col_vals_lt(
|
|
190
|
+
self,
|
|
191
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
192
|
+
value: float | int | Column,
|
|
193
|
+
na_pass: bool = False,
|
|
194
|
+
pre: Callable | None = None,
|
|
195
|
+
segments: SegmentSpec | None = None,
|
|
196
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
197
|
+
actions: Actions | None = None,
|
|
198
|
+
brief: str | bool | None = None,
|
|
199
|
+
active: bool = True,
|
|
200
|
+
) -> Validate: ...
|
|
201
|
+
def col_vals_eq(
|
|
202
|
+
self,
|
|
203
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
204
|
+
value: float | int | Column,
|
|
205
|
+
na_pass: bool = False,
|
|
206
|
+
pre: Callable | None = None,
|
|
207
|
+
segments: SegmentSpec | None = None,
|
|
208
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
209
|
+
actions: Actions | None = None,
|
|
210
|
+
brief: str | bool | None = None,
|
|
211
|
+
active: bool = True,
|
|
212
|
+
) -> Validate: ...
|
|
213
|
+
def col_vals_ne(
|
|
214
|
+
self,
|
|
215
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
216
|
+
value: float | int | Column,
|
|
217
|
+
na_pass: bool = False,
|
|
218
|
+
pre: Callable | None = None,
|
|
219
|
+
segments: SegmentSpec | None = None,
|
|
220
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
221
|
+
actions: Actions | None = None,
|
|
222
|
+
brief: str | bool | None = None,
|
|
223
|
+
active: bool = True,
|
|
224
|
+
) -> Validate: ...
|
|
225
|
+
def col_vals_ge(
|
|
226
|
+
self,
|
|
227
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
228
|
+
value: float | int | Column,
|
|
229
|
+
na_pass: bool = False,
|
|
230
|
+
pre: Callable | None = None,
|
|
231
|
+
segments: SegmentSpec | None = None,
|
|
232
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
233
|
+
actions: Actions | None = None,
|
|
234
|
+
brief: str | bool | None = None,
|
|
235
|
+
active: bool = True,
|
|
236
|
+
) -> Validate: ...
|
|
237
|
+
def col_vals_le(
|
|
238
|
+
self,
|
|
239
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
240
|
+
value: float | int | Column,
|
|
241
|
+
na_pass: bool = False,
|
|
242
|
+
pre: Callable | None = None,
|
|
243
|
+
segments: SegmentSpec | None = None,
|
|
244
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
245
|
+
actions: Actions | None = None,
|
|
246
|
+
brief: str | bool | None = None,
|
|
247
|
+
active: bool = True,
|
|
248
|
+
) -> Validate: ...
|
|
249
|
+
def col_vals_between(
|
|
250
|
+
self,
|
|
251
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
252
|
+
left: float | int | Column,
|
|
253
|
+
right: float | int | Column,
|
|
254
|
+
inclusive: tuple[bool, bool] = (True, True),
|
|
255
|
+
na_pass: bool = False,
|
|
256
|
+
pre: Callable | None = None,
|
|
257
|
+
segments: SegmentSpec | None = None,
|
|
258
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
259
|
+
actions: Actions | None = None,
|
|
260
|
+
brief: str | bool | None = None,
|
|
261
|
+
active: bool = True,
|
|
262
|
+
) -> Validate: ...
|
|
263
|
+
def col_vals_outside(
|
|
264
|
+
self,
|
|
265
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
266
|
+
left: float | int | Column,
|
|
267
|
+
right: float | int | Column,
|
|
268
|
+
inclusive: tuple[bool, bool] = (True, True),
|
|
269
|
+
na_pass: bool = False,
|
|
270
|
+
pre: Callable | None = None,
|
|
271
|
+
segments: SegmentSpec | None = None,
|
|
272
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
273
|
+
actions: Actions | None = None,
|
|
274
|
+
brief: str | bool | None = None,
|
|
275
|
+
active: bool = True,
|
|
276
|
+
) -> Validate: ...
|
|
277
|
+
def col_vals_in_set(
|
|
278
|
+
self,
|
|
279
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
280
|
+
set: Collection[Any],
|
|
281
|
+
pre: Callable | None = None,
|
|
282
|
+
segments: SegmentSpec | None = None,
|
|
283
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
284
|
+
actions: Actions | None = None,
|
|
285
|
+
brief: str | bool | None = None,
|
|
286
|
+
active: bool = True,
|
|
287
|
+
) -> Validate: ...
|
|
288
|
+
def col_vals_not_in_set(
|
|
289
|
+
self,
|
|
290
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
291
|
+
set: Collection[Any],
|
|
292
|
+
pre: Callable | None = None,
|
|
293
|
+
segments: SegmentSpec | None = None,
|
|
294
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
295
|
+
actions: Actions | None = None,
|
|
296
|
+
brief: str | bool | None = None,
|
|
297
|
+
active: bool = True,
|
|
298
|
+
) -> Validate: ...
|
|
299
|
+
def col_vals_increasing(
|
|
300
|
+
self,
|
|
301
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
302
|
+
allow_stationary: bool = False,
|
|
303
|
+
decreasing_tol: float | None = None,
|
|
304
|
+
na_pass: bool = False,
|
|
305
|
+
pre: Callable | None = None,
|
|
306
|
+
segments: SegmentSpec | None = None,
|
|
307
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
308
|
+
actions: Actions | None = None,
|
|
309
|
+
brief: str | bool | None = None,
|
|
310
|
+
active: bool = True,
|
|
311
|
+
) -> Validate: ...
|
|
312
|
+
def col_vals_decreasing(
|
|
313
|
+
self,
|
|
314
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
315
|
+
allow_stationary: bool = False,
|
|
316
|
+
increasing_tol: float | None = None,
|
|
317
|
+
na_pass: bool = False,
|
|
318
|
+
pre: Callable | None = None,
|
|
319
|
+
segments: SegmentSpec | None = None,
|
|
320
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
321
|
+
actions: Actions | None = None,
|
|
322
|
+
brief: str | bool | None = None,
|
|
323
|
+
active: bool = True,
|
|
324
|
+
) -> Validate: ...
|
|
325
|
+
def col_vals_null(
|
|
326
|
+
self,
|
|
327
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
328
|
+
pre: Callable | None = None,
|
|
329
|
+
segments: SegmentSpec | None = None,
|
|
330
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
331
|
+
actions: Actions | None = None,
|
|
332
|
+
brief: str | bool | None = None,
|
|
333
|
+
active: bool = True,
|
|
334
|
+
) -> Validate: ...
|
|
335
|
+
def col_vals_not_null(
|
|
336
|
+
self,
|
|
337
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
338
|
+
pre: Callable | None = None,
|
|
339
|
+
segments: SegmentSpec | None = None,
|
|
340
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
341
|
+
actions: Actions | None = None,
|
|
342
|
+
brief: str | bool | None = None,
|
|
343
|
+
active: bool = True,
|
|
344
|
+
) -> Validate: ...
|
|
345
|
+
def col_vals_regex(
|
|
346
|
+
self,
|
|
347
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
348
|
+
pattern: str,
|
|
349
|
+
na_pass: bool = False,
|
|
350
|
+
inverse: bool = False,
|
|
351
|
+
pre: Callable | None = None,
|
|
352
|
+
segments: SegmentSpec | None = None,
|
|
353
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
354
|
+
actions: Actions | None = None,
|
|
355
|
+
brief: str | bool | None = None,
|
|
356
|
+
active: bool = True,
|
|
357
|
+
) -> Validate: ...
|
|
358
|
+
def col_vals_within_spec(
|
|
359
|
+
self,
|
|
360
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
361
|
+
spec: str,
|
|
362
|
+
na_pass: bool = False,
|
|
363
|
+
pre: Callable | None = None,
|
|
364
|
+
segments: SegmentSpec | None = None,
|
|
365
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
366
|
+
actions: Actions | None = None,
|
|
367
|
+
brief: str | bool | None = None,
|
|
368
|
+
active: bool = True,
|
|
369
|
+
) -> Validate: ...
|
|
370
|
+
def col_vals_expr(
|
|
371
|
+
self,
|
|
372
|
+
expr: Any,
|
|
373
|
+
pre: Callable | None = None,
|
|
374
|
+
segments: SegmentSpec | None = None,
|
|
375
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
376
|
+
actions: Actions | None = None,
|
|
377
|
+
brief: str | bool | None = None,
|
|
378
|
+
active: bool = True,
|
|
379
|
+
) -> Validate: ...
|
|
380
|
+
def col_exists(
|
|
381
|
+
self,
|
|
382
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
383
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
384
|
+
actions: Actions | None = None,
|
|
385
|
+
brief: str | bool | None = None,
|
|
386
|
+
active: bool = True,
|
|
387
|
+
) -> Validate: ...
|
|
388
|
+
def col_pct_null(
|
|
389
|
+
self,
|
|
390
|
+
columns: str | list[str] | Column | ColumnSelector | ColumnSelectorNarwhals,
|
|
391
|
+
p: float,
|
|
392
|
+
tol: Tolerance = 0,
|
|
393
|
+
thresholds: int | float | None | bool | tuple | dict | Thresholds = None,
|
|
394
|
+
actions: Actions | None = None,
|
|
395
|
+
brief: str | bool | None = None,
|
|
396
|
+
active: bool = True,
|
|
397
|
+
) -> Validate: ...
|
|
398
|
+
def rows_distinct(
|
|
399
|
+
self,
|
|
400
|
+
columns_subset: str | list[str] | None = None,
|
|
401
|
+
pre: Callable | None = None,
|
|
402
|
+
segments: SegmentSpec | None = None,
|
|
403
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
404
|
+
actions: Actions | None = None,
|
|
405
|
+
brief: str | bool | None = None,
|
|
406
|
+
active: bool = True,
|
|
407
|
+
) -> Validate: ...
|
|
408
|
+
def rows_complete(
|
|
409
|
+
self,
|
|
410
|
+
columns_subset: str | list[str] | None = None,
|
|
411
|
+
pre: Callable | None = None,
|
|
412
|
+
segments: SegmentSpec | None = None,
|
|
413
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
414
|
+
actions: Actions | None = None,
|
|
415
|
+
brief: str | bool | None = None,
|
|
416
|
+
active: bool = True,
|
|
417
|
+
) -> Validate: ...
|
|
418
|
+
def prompt(
|
|
419
|
+
self,
|
|
420
|
+
prompt: str,
|
|
421
|
+
model: str,
|
|
422
|
+
columns_subset: str | list[str] | None = None,
|
|
423
|
+
batch_size: int = 1000,
|
|
424
|
+
max_concurrent: int = 3,
|
|
425
|
+
pre: Callable | None = None,
|
|
426
|
+
segments: SegmentSpec | None = None,
|
|
427
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
428
|
+
actions: Actions | None = None,
|
|
429
|
+
brief: str | bool | None = None,
|
|
430
|
+
active: bool = True,
|
|
431
|
+
) -> Validate: ...
|
|
432
|
+
def col_schema_match(
|
|
433
|
+
self,
|
|
434
|
+
schema: Schema,
|
|
435
|
+
complete: bool = True,
|
|
436
|
+
in_order: bool = True,
|
|
437
|
+
case_sensitive_colnames: bool = True,
|
|
438
|
+
case_sensitive_dtypes: bool = True,
|
|
439
|
+
full_match_dtypes: bool = True,
|
|
440
|
+
pre: Callable | None = None,
|
|
441
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
442
|
+
actions: Actions | None = None,
|
|
443
|
+
brief: str | bool | None = None,
|
|
444
|
+
active: bool = True,
|
|
445
|
+
) -> Validate: ...
|
|
446
|
+
def row_count_match(
|
|
447
|
+
self,
|
|
448
|
+
count: int | FrameT | Any,
|
|
449
|
+
tol: Tolerance = 0,
|
|
450
|
+
inverse: bool = False,
|
|
451
|
+
pre: Callable | None = None,
|
|
452
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
453
|
+
actions: Actions | None = None,
|
|
454
|
+
brief: str | bool | None = None,
|
|
455
|
+
active: bool = True,
|
|
456
|
+
) -> Validate: ...
|
|
457
|
+
def col_count_match(
|
|
458
|
+
self,
|
|
459
|
+
count: int | FrameT | Any,
|
|
460
|
+
inverse: bool = False,
|
|
461
|
+
pre: Callable | None = None,
|
|
462
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
463
|
+
actions: Actions | None = None,
|
|
464
|
+
brief: str | bool | None = None,
|
|
465
|
+
active: bool = True,
|
|
466
|
+
) -> Validate: ...
|
|
467
|
+
def tbl_match(
|
|
468
|
+
self,
|
|
469
|
+
tbl_compare: FrameT | Any,
|
|
470
|
+
pre: Callable | None = None,
|
|
471
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
472
|
+
actions: Actions | None = None,
|
|
473
|
+
brief: str | bool | None = None,
|
|
474
|
+
active: bool = True,
|
|
475
|
+
) -> Validate: ...
|
|
476
|
+
def conjointly(
|
|
477
|
+
self,
|
|
478
|
+
*exprs: Callable,
|
|
479
|
+
pre: Callable | None = None,
|
|
480
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
481
|
+
actions: Actions | None = None,
|
|
482
|
+
brief: str | bool | None = None,
|
|
483
|
+
active: bool = True,
|
|
484
|
+
) -> Validate: ...
|
|
485
|
+
def specially(
|
|
486
|
+
self,
|
|
487
|
+
expr: Callable,
|
|
488
|
+
pre: Callable | None = None,
|
|
489
|
+
thresholds: int | float | bool | tuple | dict | Thresholds = None,
|
|
490
|
+
actions: Actions | None = None,
|
|
491
|
+
brief: str | bool | None = None,
|
|
492
|
+
active: bool = True,
|
|
493
|
+
) -> Validate: ...
|
|
494
|
+
def interrogate(
|
|
495
|
+
self,
|
|
496
|
+
collect_extracts: bool = True,
|
|
497
|
+
collect_tbl_checked: bool = True,
|
|
498
|
+
get_first_n: int | None = None,
|
|
499
|
+
sample_n: int | None = None,
|
|
500
|
+
sample_frac: int | float | None = None,
|
|
501
|
+
extract_limit: int = 500,
|
|
502
|
+
) -> Validate: ...
|
|
503
|
+
def all_passed(self) -> bool: ...
|
|
504
|
+
def assert_passing(self) -> None: ...
|
|
505
|
+
def assert_below_threshold(
|
|
506
|
+
self, level: str = "warning", i: int | None = None, message: str | None = None
|
|
507
|
+
) -> None: ...
|
|
508
|
+
def above_threshold(self, level: str = "warning", i: int | None = None) -> bool: ...
|
|
509
|
+
def n(self, i: int | list[int] | None = None, scalar: bool = False) -> dict[int, int] | int: ...
|
|
510
|
+
def n_passed(
|
|
511
|
+
self, i: int | list[int] | None = None, scalar: bool = False
|
|
512
|
+
) -> dict[int, int] | int: ...
|
|
513
|
+
def n_failed(
|
|
514
|
+
self, i: int | list[int] | None = None, scalar: bool = False
|
|
515
|
+
) -> dict[int, int] | int: ...
|
|
516
|
+
def f_passed(
|
|
517
|
+
self, i: int | list[int] | None = None, scalar: bool = False
|
|
518
|
+
) -> dict[int, float] | float: ...
|
|
519
|
+
def f_failed(
|
|
520
|
+
self, i: int | list[int] | None = None, scalar: bool = False
|
|
521
|
+
) -> dict[int, float] | float: ...
|
|
522
|
+
def warning(
|
|
523
|
+
self, i: int | list[int] | None = None, scalar: bool = False
|
|
524
|
+
) -> dict[int, bool] | bool: ...
|
|
525
|
+
def error(
|
|
526
|
+
self, i: int | list[int] | None = None, scalar: bool = False
|
|
527
|
+
) -> dict[int, bool] | bool: ...
|
|
528
|
+
def critical(
|
|
529
|
+
self, i: int | list[int] | None = None, scalar: bool = False
|
|
530
|
+
) -> dict[int, bool] | bool: ...
|
|
531
|
+
def get_data_extracts(
|
|
532
|
+
self, i: int | list[int] | None = None, frame: bool = False
|
|
533
|
+
) -> dict[int, FrameT | None] | FrameT | None: ...
|
|
534
|
+
def get_json_report(
|
|
535
|
+
self, use_fields: list[str] | None = None, exclude_fields: list[str] | None = None
|
|
536
|
+
) -> str: ...
|
|
537
|
+
def get_sundered_data(self, type: str = "pass") -> FrameT: ...
|
|
538
|
+
def get_notes(
|
|
539
|
+
self, i: int, format: str = "dict"
|
|
540
|
+
) -> dict[str, dict[str, str]] | list[str] | None: ...
|
|
541
|
+
def get_note(self, i: int, key: str, format: str = "dict") -> dict[str, str] | str | None: ...
|
|
542
|
+
def get_tabular_report(
|
|
543
|
+
self,
|
|
544
|
+
title: str | None = ":default:",
|
|
545
|
+
incl_header: bool | None = None,
|
|
546
|
+
incl_footer: bool | None = None,
|
|
547
|
+
incl_footer_timings: bool | None = None,
|
|
548
|
+
incl_footer_notes: bool | None = None,
|
|
549
|
+
) -> GT: ...
|
|
550
|
+
def get_step_report(
|
|
551
|
+
self,
|
|
552
|
+
i: int,
|
|
553
|
+
columns_subset: str | list[str] | Column | None = None,
|
|
554
|
+
header: str = ":default:",
|
|
555
|
+
limit: int | None = 10,
|
|
556
|
+
) -> GT: ...
|
|
557
|
+
def _add_validation(self, validation_info): ...
|
|
558
|
+
def _evaluate_column_exprs(self, validation_info): ...
|
|
559
|
+
def _evaluate_segments(self, validation_info): ...
|
|
560
|
+
def _get_validation_dict(self, i: int | list[int] | None, attr: str) -> dict[int, int]: ...
|
|
561
|
+
def _execute_final_actions(self) -> None: ...
|
|
562
|
+
def _get_highest_severity_level(self): ...
|
|
563
|
+
# === GENERATED START ===
|
|
564
|
+
def col_sum_eq(
|
|
565
|
+
self,
|
|
566
|
+
columns: _PBUnresolvedColumn,
|
|
567
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
568
|
+
tol: Tolerance = 0,
|
|
569
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
570
|
+
brief: str | bool = False,
|
|
571
|
+
actions: Actions | None = None,
|
|
572
|
+
active: bool = True,
|
|
573
|
+
) -> Validate:
|
|
574
|
+
"""Assert the values in a column sum to a value eq some `value`.
|
|
575
|
+
|
|
576
|
+
Args:
|
|
577
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
578
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
579
|
+
If None and reference data is set on the Validate object, defaults to
|
|
580
|
+
ref(column) to compare against the same column in the reference data.
|
|
581
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
582
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
583
|
+
the bounds. See examples for usage. Defaults to None.
|
|
584
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
585
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
586
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
587
|
+
|
|
588
|
+
Returns:
|
|
589
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
590
|
+
|
|
591
|
+
Examples:
|
|
592
|
+
>>> import polars as pl
|
|
593
|
+
>>>
|
|
594
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
595
|
+
>>> v = Validate(data).col_sum_eq("a", 15)
|
|
596
|
+
>>> v.assert_passing()
|
|
597
|
+
"""
|
|
598
|
+
...
|
|
599
|
+
|
|
600
|
+
def col_sum_gt(
|
|
601
|
+
self,
|
|
602
|
+
columns: _PBUnresolvedColumn,
|
|
603
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
604
|
+
tol: Tolerance = 0,
|
|
605
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
606
|
+
brief: str | bool = False,
|
|
607
|
+
actions: Actions | None = None,
|
|
608
|
+
active: bool = True,
|
|
609
|
+
) -> Validate:
|
|
610
|
+
"""Assert the values in a column sum to a value gt some `value`.
|
|
611
|
+
|
|
612
|
+
Args:
|
|
613
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
614
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
615
|
+
If None and reference data is set on the Validate object, defaults to
|
|
616
|
+
ref(column) to compare against the same column in the reference data.
|
|
617
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
618
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
619
|
+
the bounds. See examples for usage. Defaults to None.
|
|
620
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
621
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
622
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
623
|
+
|
|
624
|
+
Returns:
|
|
625
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
626
|
+
|
|
627
|
+
Examples:
|
|
628
|
+
>>> import polars as pl
|
|
629
|
+
>>>
|
|
630
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
631
|
+
>>> v = Validate(data).col_sum_gt("a", 10)
|
|
632
|
+
>>> v.assert_passing()
|
|
633
|
+
"""
|
|
634
|
+
...
|
|
635
|
+
|
|
636
|
+
def col_sum_ge(
|
|
637
|
+
self,
|
|
638
|
+
columns: _PBUnresolvedColumn,
|
|
639
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
640
|
+
tol: Tolerance = 0,
|
|
641
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
642
|
+
brief: str | bool = False,
|
|
643
|
+
actions: Actions | None = None,
|
|
644
|
+
active: bool = True,
|
|
645
|
+
) -> Validate:
|
|
646
|
+
"""Assert the values in a column sum to a value ge some `value`.
|
|
647
|
+
|
|
648
|
+
Args:
|
|
649
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
650
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
651
|
+
If None and reference data is set on the Validate object, defaults to
|
|
652
|
+
ref(column) to compare against the same column in the reference data.
|
|
653
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
654
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
655
|
+
the bounds. See examples for usage. Defaults to None.
|
|
656
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
657
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
658
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
659
|
+
|
|
660
|
+
Returns:
|
|
661
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
662
|
+
|
|
663
|
+
Examples:
|
|
664
|
+
>>> import polars as pl
|
|
665
|
+
>>>
|
|
666
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
667
|
+
>>> v = Validate(data).col_sum_ge("a", 15)
|
|
668
|
+
>>> v.assert_passing()
|
|
669
|
+
"""
|
|
670
|
+
...
|
|
671
|
+
|
|
672
|
+
def col_sum_lt(
|
|
673
|
+
self,
|
|
674
|
+
columns: _PBUnresolvedColumn,
|
|
675
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
676
|
+
tol: Tolerance = 0,
|
|
677
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
678
|
+
brief: str | bool = False,
|
|
679
|
+
actions: Actions | None = None,
|
|
680
|
+
active: bool = True,
|
|
681
|
+
) -> Validate:
|
|
682
|
+
"""Assert the values in a column sum to a value lt some `value`.
|
|
683
|
+
|
|
684
|
+
Args:
|
|
685
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
686
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
687
|
+
If None and reference data is set on the Validate object, defaults to
|
|
688
|
+
ref(column) to compare against the same column in the reference data.
|
|
689
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
690
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
691
|
+
the bounds. See examples for usage. Defaults to None.
|
|
692
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
693
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
694
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
695
|
+
|
|
696
|
+
Returns:
|
|
697
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
698
|
+
|
|
699
|
+
Examples:
|
|
700
|
+
>>> import polars as pl
|
|
701
|
+
>>>
|
|
702
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
703
|
+
>>> v = Validate(data).col_sum_lt("a", 20)
|
|
704
|
+
>>> v.assert_passing()
|
|
705
|
+
"""
|
|
706
|
+
...
|
|
707
|
+
|
|
708
|
+
def col_sum_le(
|
|
709
|
+
self,
|
|
710
|
+
columns: _PBUnresolvedColumn,
|
|
711
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
712
|
+
tol: Tolerance = 0,
|
|
713
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
714
|
+
brief: str | bool = False,
|
|
715
|
+
actions: Actions | None = None,
|
|
716
|
+
active: bool = True,
|
|
717
|
+
) -> Validate:
|
|
718
|
+
"""Assert the values in a column sum to a value le some `value`.
|
|
719
|
+
|
|
720
|
+
Args:
|
|
721
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
722
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
723
|
+
If None and reference data is set on the Validate object, defaults to
|
|
724
|
+
ref(column) to compare against the same column in the reference data.
|
|
725
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
726
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
727
|
+
the bounds. See examples for usage. Defaults to None.
|
|
728
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
729
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
730
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
731
|
+
|
|
732
|
+
Returns:
|
|
733
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
734
|
+
|
|
735
|
+
Examples:
|
|
736
|
+
>>> import polars as pl
|
|
737
|
+
>>>
|
|
738
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
739
|
+
>>> v = Validate(data).col_sum_le("a", 15)
|
|
740
|
+
>>> v.assert_passing()
|
|
741
|
+
"""
|
|
742
|
+
...
|
|
743
|
+
|
|
744
|
+
def col_avg_eq(
|
|
745
|
+
self,
|
|
746
|
+
columns: _PBUnresolvedColumn,
|
|
747
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
748
|
+
tol: Tolerance = 0,
|
|
749
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
750
|
+
brief: str | bool = False,
|
|
751
|
+
actions: Actions | None = None,
|
|
752
|
+
active: bool = True,
|
|
753
|
+
) -> Validate:
|
|
754
|
+
"""Assert the values in a column avg to a value eq some `value`.
|
|
755
|
+
|
|
756
|
+
Args:
|
|
757
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
758
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
759
|
+
If None and reference data is set on the Validate object, defaults to
|
|
760
|
+
ref(column) to compare against the same column in the reference data.
|
|
761
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
762
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
763
|
+
the bounds. See examples for usage. Defaults to None.
|
|
764
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
765
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
766
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
767
|
+
|
|
768
|
+
Returns:
|
|
769
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
770
|
+
|
|
771
|
+
Examples:
|
|
772
|
+
>>> import polars as pl
|
|
773
|
+
>>>
|
|
774
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
775
|
+
>>> v = Validate(data).col_avg_eq("a", 3)
|
|
776
|
+
>>> v.assert_passing()
|
|
777
|
+
"""
|
|
778
|
+
...
|
|
779
|
+
|
|
780
|
+
def col_avg_gt(
|
|
781
|
+
self,
|
|
782
|
+
columns: _PBUnresolvedColumn,
|
|
783
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
784
|
+
tol: Tolerance = 0,
|
|
785
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
786
|
+
brief: str | bool = False,
|
|
787
|
+
actions: Actions | None = None,
|
|
788
|
+
active: bool = True,
|
|
789
|
+
) -> Validate:
|
|
790
|
+
"""Assert the values in a column avg to a value gt some `value`.
|
|
791
|
+
|
|
792
|
+
Args:
|
|
793
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
794
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
795
|
+
If None and reference data is set on the Validate object, defaults to
|
|
796
|
+
ref(column) to compare against the same column in the reference data.
|
|
797
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
798
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
799
|
+
the bounds. See examples for usage. Defaults to None.
|
|
800
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
801
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
802
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
803
|
+
|
|
804
|
+
Returns:
|
|
805
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
806
|
+
|
|
807
|
+
Examples:
|
|
808
|
+
>>> import polars as pl
|
|
809
|
+
>>>
|
|
810
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
811
|
+
>>> v = Validate(data).col_avg_gt("a", 2)
|
|
812
|
+
>>> v.assert_passing()
|
|
813
|
+
"""
|
|
814
|
+
...
|
|
815
|
+
|
|
816
|
+
def col_avg_ge(
|
|
817
|
+
self,
|
|
818
|
+
columns: _PBUnresolvedColumn,
|
|
819
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
820
|
+
tol: Tolerance = 0,
|
|
821
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
822
|
+
brief: str | bool = False,
|
|
823
|
+
actions: Actions | None = None,
|
|
824
|
+
active: bool = True,
|
|
825
|
+
) -> Validate:
|
|
826
|
+
"""Assert the values in a column avg to a value ge some `value`.
|
|
827
|
+
|
|
828
|
+
Args:
|
|
829
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
830
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
831
|
+
If None and reference data is set on the Validate object, defaults to
|
|
832
|
+
ref(column) to compare against the same column in the reference data.
|
|
833
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
834
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
835
|
+
the bounds. See examples for usage. Defaults to None.
|
|
836
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
837
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
838
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
839
|
+
|
|
840
|
+
Returns:
|
|
841
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
842
|
+
|
|
843
|
+
Examples:
|
|
844
|
+
>>> import polars as pl
|
|
845
|
+
>>>
|
|
846
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
847
|
+
>>> v = Validate(data).col_avg_ge("a", 3)
|
|
848
|
+
>>> v.assert_passing()
|
|
849
|
+
"""
|
|
850
|
+
...
|
|
851
|
+
|
|
852
|
+
def col_avg_lt(
|
|
853
|
+
self,
|
|
854
|
+
columns: _PBUnresolvedColumn,
|
|
855
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
856
|
+
tol: Tolerance = 0,
|
|
857
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
858
|
+
brief: str | bool = False,
|
|
859
|
+
actions: Actions | None = None,
|
|
860
|
+
active: bool = True,
|
|
861
|
+
) -> Validate:
|
|
862
|
+
"""Assert the values in a column avg to a value lt some `value`.
|
|
863
|
+
|
|
864
|
+
Args:
|
|
865
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
866
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
867
|
+
If None and reference data is set on the Validate object, defaults to
|
|
868
|
+
ref(column) to compare against the same column in the reference data.
|
|
869
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
870
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
871
|
+
the bounds. See examples for usage. Defaults to None.
|
|
872
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
873
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
874
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
875
|
+
|
|
876
|
+
Returns:
|
|
877
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
878
|
+
|
|
879
|
+
Examples:
|
|
880
|
+
>>> import polars as pl
|
|
881
|
+
>>>
|
|
882
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
883
|
+
>>> v = Validate(data).col_avg_lt("a", 5)
|
|
884
|
+
>>> v.assert_passing()
|
|
885
|
+
"""
|
|
886
|
+
...
|
|
887
|
+
|
|
888
|
+
def col_avg_le(
|
|
889
|
+
self,
|
|
890
|
+
columns: _PBUnresolvedColumn,
|
|
891
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
892
|
+
tol: Tolerance = 0,
|
|
893
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
894
|
+
brief: str | bool = False,
|
|
895
|
+
actions: Actions | None = None,
|
|
896
|
+
active: bool = True,
|
|
897
|
+
) -> Validate:
|
|
898
|
+
"""Assert the values in a column avg to a value le some `value`.
|
|
899
|
+
|
|
900
|
+
Args:
|
|
901
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
902
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
903
|
+
If None and reference data is set on the Validate object, defaults to
|
|
904
|
+
ref(column) to compare against the same column in the reference data.
|
|
905
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
906
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
907
|
+
the bounds. See examples for usage. Defaults to None.
|
|
908
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
909
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
910
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
911
|
+
|
|
912
|
+
Returns:
|
|
913
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
914
|
+
|
|
915
|
+
Examples:
|
|
916
|
+
>>> import polars as pl
|
|
917
|
+
>>>
|
|
918
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
919
|
+
>>> v = Validate(data).col_avg_le("a", 3)
|
|
920
|
+
>>> v.assert_passing()
|
|
921
|
+
"""
|
|
922
|
+
...
|
|
923
|
+
|
|
924
|
+
def col_sd_eq(
|
|
925
|
+
self,
|
|
926
|
+
columns: _PBUnresolvedColumn,
|
|
927
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
928
|
+
tol: Tolerance = 0,
|
|
929
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
930
|
+
brief: str | bool = False,
|
|
931
|
+
actions: Actions | None = None,
|
|
932
|
+
active: bool = True,
|
|
933
|
+
) -> Validate:
|
|
934
|
+
"""Assert the values in a column sd to a value eq some `value`.
|
|
935
|
+
|
|
936
|
+
Args:
|
|
937
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
938
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
939
|
+
If None and reference data is set on the Validate object, defaults to
|
|
940
|
+
ref(column) to compare against the same column in the reference data.
|
|
941
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
942
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
943
|
+
the bounds. See examples for usage. Defaults to None.
|
|
944
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
945
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
946
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
947
|
+
|
|
948
|
+
Returns:
|
|
949
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
950
|
+
|
|
951
|
+
Examples:
|
|
952
|
+
>>> import polars as pl
|
|
953
|
+
>>>
|
|
954
|
+
>>> data = pl.DataFrame({"a": [2, 4, 6, 8, 10]})
|
|
955
|
+
>>> v = Validate(data).col_sd_eq("a", 3.1622776601683795)
|
|
956
|
+
>>> v.assert_passing()
|
|
957
|
+
"""
|
|
958
|
+
...
|
|
959
|
+
|
|
960
|
+
def col_sd_gt(
|
|
961
|
+
self,
|
|
962
|
+
columns: _PBUnresolvedColumn,
|
|
963
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
964
|
+
tol: Tolerance = 0,
|
|
965
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
966
|
+
brief: str | bool = False,
|
|
967
|
+
actions: Actions | None = None,
|
|
968
|
+
active: bool = True,
|
|
969
|
+
) -> Validate:
|
|
970
|
+
"""Assert the values in a column sd to a value gt some `value`.
|
|
971
|
+
|
|
972
|
+
Args:
|
|
973
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
974
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
975
|
+
If None and reference data is set on the Validate object, defaults to
|
|
976
|
+
ref(column) to compare against the same column in the reference data.
|
|
977
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
978
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
979
|
+
the bounds. See examples for usage. Defaults to None.
|
|
980
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
981
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
982
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
983
|
+
|
|
984
|
+
Returns:
|
|
985
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
986
|
+
|
|
987
|
+
Examples:
|
|
988
|
+
>>> import polars as pl
|
|
989
|
+
>>>
|
|
990
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
991
|
+
>>> v = Validate(data).col_sd_gt("a", 1)
|
|
992
|
+
>>> v.assert_passing()
|
|
993
|
+
"""
|
|
994
|
+
...
|
|
995
|
+
|
|
996
|
+
def col_sd_ge(
|
|
997
|
+
self,
|
|
998
|
+
columns: _PBUnresolvedColumn,
|
|
999
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
1000
|
+
tol: Tolerance = 0,
|
|
1001
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
1002
|
+
brief: str | bool = False,
|
|
1003
|
+
actions: Actions | None = None,
|
|
1004
|
+
active: bool = True,
|
|
1005
|
+
) -> Validate:
|
|
1006
|
+
"""Assert the values in a column sd to a value ge some `value`.
|
|
1007
|
+
|
|
1008
|
+
Args:
|
|
1009
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
1010
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
1011
|
+
If None and reference data is set on the Validate object, defaults to
|
|
1012
|
+
ref(column) to compare against the same column in the reference data.
|
|
1013
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
1014
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
1015
|
+
the bounds. See examples for usage. Defaults to None.
|
|
1016
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
1017
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
1018
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
1019
|
+
|
|
1020
|
+
Returns:
|
|
1021
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
1022
|
+
|
|
1023
|
+
Examples:
|
|
1024
|
+
>>> import polars as pl
|
|
1025
|
+
>>>
|
|
1026
|
+
>>> data = pl.DataFrame({"a": [2, 4, 4, 4, 6]})
|
|
1027
|
+
>>> v = Validate(data).col_sd_ge("a", 1.4142135623730951)
|
|
1028
|
+
>>> v.assert_passing()
|
|
1029
|
+
"""
|
|
1030
|
+
...
|
|
1031
|
+
|
|
1032
|
+
def col_sd_lt(
|
|
1033
|
+
self,
|
|
1034
|
+
columns: _PBUnresolvedColumn,
|
|
1035
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
1036
|
+
tol: Tolerance = 0,
|
|
1037
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
1038
|
+
brief: str | bool = False,
|
|
1039
|
+
actions: Actions | None = None,
|
|
1040
|
+
active: bool = True,
|
|
1041
|
+
) -> Validate:
|
|
1042
|
+
"""Assert the values in a column sd to a value lt some `value`.
|
|
1043
|
+
|
|
1044
|
+
Args:
|
|
1045
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
1046
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
1047
|
+
If None and reference data is set on the Validate object, defaults to
|
|
1048
|
+
ref(column) to compare against the same column in the reference data.
|
|
1049
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
1050
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
1051
|
+
the bounds. See examples for usage. Defaults to None.
|
|
1052
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
1053
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
1054
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
1055
|
+
|
|
1056
|
+
Returns:
|
|
1057
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
1058
|
+
|
|
1059
|
+
Examples:
|
|
1060
|
+
>>> import polars as pl
|
|
1061
|
+
>>>
|
|
1062
|
+
>>> data = pl.DataFrame({"a": [1, 2, 3, 4, 5]})
|
|
1063
|
+
>>> v = Validate(data).col_sd_lt("a", 2)
|
|
1064
|
+
>>> v.assert_passing()
|
|
1065
|
+
"""
|
|
1066
|
+
...
|
|
1067
|
+
|
|
1068
|
+
def col_sd_le(
|
|
1069
|
+
self,
|
|
1070
|
+
columns: _PBUnresolvedColumn,
|
|
1071
|
+
value: float | Column | ReferenceColumn | None = None,
|
|
1072
|
+
tol: Tolerance = 0,
|
|
1073
|
+
thresholds: float | bool | tuple | dict | Thresholds | None = None,
|
|
1074
|
+
brief: str | bool = False,
|
|
1075
|
+
actions: Actions | None = None,
|
|
1076
|
+
active: bool = True,
|
|
1077
|
+
) -> Validate:
|
|
1078
|
+
"""Assert the values in a column sd to a value le some `value`.
|
|
1079
|
+
|
|
1080
|
+
Args:
|
|
1081
|
+
columns (_PBUnresolvedColumn): Column or collection of columns to validate.
|
|
1082
|
+
value (float | Column | ReferenceColumn | None): Target value to validate against.
|
|
1083
|
+
If None and reference data is set on the Validate object, defaults to
|
|
1084
|
+
ref(column) to compare against the same column in the reference data.
|
|
1085
|
+
tol (Tolerance, optional): Tolerance for validation distance to target. Defaults to 0.
|
|
1086
|
+
thresholds (float | bool | tuple | dict | Thresholds | None, optional): Custom thresholds for
|
|
1087
|
+
the bounds. See examples for usage. Defaults to None.
|
|
1088
|
+
brief (str | bool, optional): Explanation of validation operation. Defaults to False.
|
|
1089
|
+
actions (Actions | None, optional): Actions to take after validation. Defaults to None.
|
|
1090
|
+
active (bool, optional): Whether to activate the validation. Defaults to True.
|
|
1091
|
+
|
|
1092
|
+
Returns:
|
|
1093
|
+
Validate: A `Validate` instance with the new validation method added.
|
|
1094
|
+
|
|
1095
|
+
Examples:
|
|
1096
|
+
>>> import polars as pl
|
|
1097
|
+
>>>
|
|
1098
|
+
>>> data = pl.DataFrame({"a": [2, 4, 4, 4, 6]})
|
|
1099
|
+
>>> v = Validate(data).col_sd_le("a", 1.4142135623730951)
|
|
1100
|
+
>>> v.assert_passing()
|
|
1101
|
+
"""
|
|
1102
|
+
...
|
|
1103
|
+
|
|
1104
|
+
# === GENERATED END ===
|