mdf_reader.validator.validate

Created on Tue Apr 30 09:38:17 2019

Validates elements in a pandas DataFrame against its input data model. Output is a boolean DataFrame

Validated elements are those with the following column_types:
  • any in properties.numeric_types: range validation

  • ‘key’: code table validation

  • ‘datetime’: because of the way they are converted, read into datetime,

they should already be NaT if they not validate as a valid datetime. The correspoding mask is just created for them

DEV notes: need to add tolerance to the numeric range validation

@author: iregon

Module Contents

Functions

validate_numeric(elements, data, schema)

validate_codes(elements, data, code_tables_path, schema, supp=False)

validate(data, mask0, schema, code_tables_path)

validate_numeric(elements, data, schema)[source]
validate_codes(elements, data, code_tables_path, schema, supp=False)[source]
validate(data, mask0, schema, code_tables_path)[source]