dynamicio
dynamicio copied to clipboard
feat: Adjust `is_lower_than_or_equal` validations to account for an optional threshold
Context
Currently the is_lower_than_or_equal , is_greater_than_or_equal
etc. validations will raise an exception even if there's a single row that violates the provided condition.
Desired functionality
We would like to make this behaviour optionally "slacked", by providing an optional argument that it will indicate the minimum number of DataFrame rows that should violate the provided validation in order to raise an Exception. For example this could like sth like this:
validations:
is_greater_than_or_equal:
apply: true
options:
threshold: 100
min_rows: 20
This means that the validation would throw an exception only if a DtaFrame has more than 20 rows where the values are < 100.