-
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
isDistinctValidation(_SeriesValidation) for a combination of columns i.e. as composite keys #2
Comments
I'd be interested in something like this as well. In general it would be nice to have validation across columns. Not sure what's the best way though to generalize the current schema which is centered on independent columns. @TMiguelT have you got any suggestions? |
Hmm. This seems like a useful validation to have. I'll have to think about how to handle DataFrame-level validations in terms of the interface |
Another one we are using is something like "if col a has value x then col b needs to have value in list c", so you would need to some sort of constraint that works on the data frame itself. Something like |
Good point. There's probably a need for a generalised DataFrame-level validation |
(off-topic) |
I'm happy to have contributions for this or any other feature requests. I've commented on your other PR |
I am interested in this enhancement too. In my case I would be using it to check if a total count column is in fact equal to the total of several category count columns. Thanks! |
Closing in favour of the more general #57 that I just opened. |
Hi there.
Consider the following
schema
with fake column namesthis works on top of the
series.duplicated
method of pandas.Consider that there is also a method for Dataframes, is it possible to establish composite columns
so
IsDistinctValidation()
checks for combinations also? kind of an additional parameter**columns
as a list of columns defined inside the sameschema
passed toisDistinctValidation()
.What I do now is to insert a new temporary column as a tuple out of the elements I want to check i.e.
and then in the schema add the column as
BTW nice job and thanks!
The text was updated successfully, but these errors were encountered: