Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to detect int validation errors #67

Open
NiharP opened this issue Feb 24, 2022 · 0 comments
Open

Unable to detect int validation errors #67

NiharP opened this issue Feb 24, 2022 · 0 comments
Labels

Comments

@NiharP
Copy link

NiharP commented Feb 24, 2022

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.

@multimeric multimeric added the bug label Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants