multimeric/PandasSchema

Unable to detect int validation errors

NiharP opened this issue · 0 comments

Steps to reproduce:

from pandas_schema import Column, Schema
from pandas_schema.validation import MatchesPatternValidation, CanConvertValidation, CustomSeriesValidation
import pandas as pd

schema = Schema([
    Column('col1', [
        CanConvertValidation(int) 
    ])
])

test_data = pd.DataFrame({
    'col1': [
        11,
        13.1234,
        '123',
        '8',
        '1'
    ]
})

errors = schema.validate(test_data)

for error in errors:
    print('"{}" failed!'.format(error.value))

Expected behavior:
It should return a single error for value 13.1234

Actual Behavior:
No errors detected.