-
-
Notifications
You must be signed in to change notification settings - Fork 316
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
Mypy - SchemaModel.validate does not return a DataFrame #763
Comments
Facing the same issue right now. I would like to validate my dataframes right after loading them from csv and then have the proper type annotation from there. Currently I am using a small custom function which calls |
Looking into this... basically need to do the following:
Probably for another PR, but will probably also need to overload the @lorenzo-w would you be open to making a contribution here? |
@cosmicBboy Wow thanks! That was the swiftest response I've ever had to a public issue. How could I say no then? 🙃 |
Great @lorenzo-w ! The issue's been around for a while, so didn't want it to fall through the cracks again. Let me know if you need any help, check out the contribution guide to get your dev environment set up |
Also running into this issue and I'm happy to help. Just noting that for now you could also call |
The
SchemaModel.validate
function returns aDataFrameBase[T]
, which does not extendpd.DataFrame
.This makes type validations fail whenever a
pd.DataFrame
is expected. For example:Why does
Schema.validate
return aDataFrameBase[T]
instead of aDataFrame[T]
?This is the same for the
SchemaModel.example
function.(pandera version 0.9.0)
The text was updated successfully, but these errors were encountered: