-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
Setting coerce
on a column causes the column to be required
when required=False
#1660
Open
2 of 3 tasks
Labels
bug
Something isn't working
Comments
Actually here is a more minimal repro s = pa.DataFrameSchema(
{
"missing_column": pa.Column(int, required=False, coerce=True),
}
)
df = pl.DataFrame()
s.validate(df)
I was surprised to see |
adam-porich-sm
changed the title
Setting May 29, 2024
coerce
at the DataFrameSchema level overrides required
at the Column levelcoerce
on a column causes the column to be required
when required=False
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
A clear and concise description of what the bug is.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Expected behavior
I expect both validate calls to succeed
Desktop (please complete the following information):
Additional context
It appears that the coerce at the
DataFrameSchema
causes therequired=False
on the Column to be ignored.The text was updated successfully, but these errors were encountered: