Python Cerberus – Validating Schema with this Example

I am using Cerberus to validate dataframes schema. Using this sample data and code below, the if-else statement should "data structure is valid", however it returns that the "data structure is not valid". Any insight would be appreciated. import pandas as pd from cerberus import Validator df = pd.DataFrame({ ‘name’: [‘Alice’, ‘Bob’, ‘Charlie’], ‘age’: [25,… Read More Python Cerberus – Validating Schema with this Example

How to use min value with type datetime in Cerberus?

I want validate a field with one value greater or equal 01/01/1900 in type datetime in Cerberus, but not works this way: from cerberus import Validator from datetime import datetime v = Validator() schema = { "birthdate": { "type": "datetime", "required": True, "min": datetime(1900, 1, 1) } } document_valid = {‘birthdate’: ’05/03/1900′} document_invalid = {‘birthdate’:… Read More How to use min value with type datetime in Cerberus?