multimeric / PandasSchema

A validation library for Pandas data frames using user-friendly schemas
https://multimeric.github.io/PandasSchema/
GNU General Public License v3.0
189 stars 35 forks source link

Question: How do you do validation for two columns that depend on each other #25

Closed dtamez closed 3 years ago

dtamez commented 5 years ago

Easy example: You have a column for phone and a column for email. One of them has to be supplied - they can't both be blank.

I can create a new column that has the other two columns combined and run a custom validator on that - but if there's a built in way I'd like to know.

multimeric commented 5 years ago

Currently, you can't. See #2. This is something I've been meaning to get to for a while, but of course a PR would be the fastest way to get this implemented.

contang0 commented 4 years ago

May I add that it would be useful to be able to construct validation on arbitrary number of columns, not just two.

Abhisek1994Roy commented 3 years ago

Any update on validations with 2 or more columns? I understand that it is not implemented inherently, but can we at least do it using custom functions?

multimeric commented 3 years ago

Sorting this out has ended up requiring a whole rewrite to the library. My lack of spare time, plus losing a few days of uncommitted work has unfortunately slowed this down. There is no way to do this within the confines of the library as is.

multimeric commented 3 years ago

I'm closing this issue because it's strongly related to #2, and any work that closes it will close this also.