After looking at the validation and invalidation methods for time series and metering points I see a couple of things that we can do better:
[ ] Reuse methods, such that we do not have to write find_valid and find_invalid for both datasets
[ ] Rewrite logic, such that we only run through all rules once and mark rows accordingly
I suggest that we have one function that takes a dataframe and a ruleset as input, it will check the dataframe against the rules and mark those that does not comply with rules. Rows that are not marked, would be seen as valid.
After looking at the validation and invalidation methods for time series and metering points I see a couple of things that we can do better:
I suggest that we have one function that takes a dataframe and a ruleset as input, it will check the dataframe against the rules and mark those that does not comply with rules. Rows that are not marked, would be seen as valid.