-
Notifications
You must be signed in to change notification settings - Fork 36
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
Ignore NaN values in validation #13
Comments
I like this idea. Seems fundamentally wrong to be testing against |
Oh, yes this seems pretty reasonable. I'd definitely accept a PR for this |
Wait, I just realised that this seems like the use-case for the If you do this, does it have your desired behaviour? ps.Column('some_column', [ps.validation.InListValidation(["FOO", "BAR", "BAZ"])], allow_empty=True) |
Maybe. But if I set |
Okay, I'll have a look into why that's happening |
perhaps rather than having an option to ignore nans, we should have an option to ignore a list of values? this is desirable in situations where you have data where nans are represented by blanks, spaces etc, and for whatever reason you do not want to convert them into proper NaNs. in that case i'd prefer to let the validator know which values i want to ignore. something like
|
Possibly, although this could equally be done by composing Validators, and I prefer to keep the API simple if there's already a reasonable solution. In your case you could just have |
This is related to #5
Basically, Whenever I add some validation like
I have to add the
"nan"
to the list to avoid having null rows being assumed non valid, considering that some rows might contain null values orNone
. I understand that one might want to mark null values as invalid, so I propose different interface, something likeThis parameter
ignore_nan
can be set asFalse
by default to get the current behaviour.The text was updated successfully, but these errors were encountered: