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
I today found out that I had a non-validated-enough dataframe, even if I was using strict=True. This was due to the fact that strict=True does not imply any kind of checks on the index.
As a user, when I run FooModel.validate(df), since I added strict=True, I would expect that any error or missing aspect in FooModel leads to an exception being raised. At the contrary, if I do not see any exception, that leads me to think that my FooModel is correct.
does not raise any error. It breaks somehow the semantics of strict=True in my opinion, as it leaves some room for flexibility in the dataframe to be validated. In this example the non-None name on the index of df, and the fact that the index has dtype object. Do you agree ?
I would suggest to modify strict=True to perform the following: when the schema does not contain any specification about the index, validate that the index is the default pandas index (a rangeindex with no name).
The text was updated successfully, but these errors were encountered:
Hi, first of all thanks for this great library !
I today found out that I had a non-validated-enough dataframe, even if I was using
strict=True
. This was due to the fact thatstrict=True
does not imply any kind of checks on the index.Here is an example :
As a user, when I run
FooModel.validate(df)
, since I addedstrict=True
, I would expect that any error or missing aspect inFooModel
leads to an exception being raised. At the contrary, if I do not see any exception, that leads me to think that myFooModel
is correct.Yet,
does not raise any error. It breaks somehow the semantics of
strict=True
in my opinion, as it leaves some room for flexibility in the dataframe to be validated. In this example the non-None name on the index of df, and the fact that the index has dtype object. Do you agree ?I would suggest to modify
strict=True
to perform the following: when the schema does not contain any specification about the index, validate that the index is the default pandas index (a rangeindex with no name).The text was updated successfully, but these errors were encountered: