I have fetched the data as List < T > by reading from different formats e.g. CSV, Parquet, Avro, JSON.
I want to validate the data with mostly feature e.g. The temperature should remain with in range 95% of the time, and rest of the time column value can be null or out of range.
Sample use case expectation:
Expect_Column_Values_To_Be_Between(
columnName = "temprature",
minValue = 60,
maxValue = 75,
mostly = .95
)
Data Annotation seems to solve it partially (missing mostly feature) as it works on row level not on entire table i.e. object level.
[Range(60, 75, ErrorMessage = "Thermostat value {0} must be between {1} and {2}.")]
public int Temprature;
The Python package reference: https://github.com/great-expectations/.great_expectations contains similar data level validations.
Now trying to seek out guidance how to validate the data (either by any existing equivalent library in .NET or by creating new helper class/extension methods)