You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from Pandera 0.20.4 to 0.21.0, the data type validation at DataFrame Models initialization (cf this doc) seems to be broken: validating a wrong dataframe does not raise an error.
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandera.
(optional) I have confirmed this bug exists on the main branch of pandera.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
importpandasaspdfrompanderaimportDataFrameModelfrompandera.typingimportDataFrameclassExampleModel(DataFrameModel):
field1: strfield2: float# This is supposed to crash, the schema is not respected.# This is raising validation error (as expected) in 0.20.4, but not in 0.21.0dataframe=DataFrame[ExampleModel](
pd.DataFrame.from_dict(
{
"field3": [None, None, 1, None, 2],
}
)
)
# Only reached in 0.21.0print(dataframe)
Expected behavior
The data type validation should raise an error, and the line print(dataframe) shouldnot be reached.
Desktop (please complete the following information):
OS: Linux Mint
Version: 21.2
The text was updated successfully, but these errors were encountered:
Describe the bug
After upgrading from Pandera 0.20.4 to 0.21.0, the data type validation at DataFrame Models initialization (cf this doc) seems to be broken: validating a wrong dataframe does not raise an error.
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
The data type validation should raise an error, and the line
print(dataframe)
shouldnot be reached.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: