Closed jstammers closed 3 years ago
hi @jstammers, currently there isn't a nullable
option at the schema model Config
(which maps onto the DataFrameSchema keyword options), but specifying additional constraints on Field
should work:
class InputDataModel(pa.SchemaModel):
column1: pa.typing.Series[pa.typing.Int] = pa.Field(nullable=True)
My mistake! I was following the docs here and assumed that because coerce
was specified, other properties would map onto keyword arguments for Field
.
no probs! closing this issue
Describe the bug I'm trying to validate a data frame that contains null values in an integer column. However, I'm encountering a
SchemaError
when validating the data, even after specifyingnullable=True
in the Config classNote: 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
InputDataModel
should correctly validate the given data frame