Replies: 1 comment
-
Hi @muhammadkashif-10p so currently the solution for this would be: try:
schema.validate(df, lazy=True)
except pa.errors.SchemaErrors as err:
invalid_data = err.data.loc[err.failure_cases["index"]]
valid_data = err.data.loc[~err.data.index.isin(err.failure_cases["index"])] You can create a utility function for this and reuse it in your codebase. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to validate my dataframe but I don't want pandera to throw an error if any row is invalid. I want to filter the valid rows from the invalid rows. I've looked at the documentation but couldn't find anything.
Beta Was this translation helpful? Give feedback.
All reactions