Related to #457, when using @check_types with a SchemaModel that has coerce=True set as the config, the input dataframe is not coerced to the specified types.
[x] I have checked that this issue has not already been reported.
[x] I have confirmed this bug exists on the latest version of pandas.
[ ] (optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Describe the bug
Related to #457, when using @check_types with a SchemaModel that has coerce=True set as the config, the input dataframe is not coerced to the specified types.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Error comes from https://github.com/pandera-dev/pandera/blob/3191be9c1237eb07780c5c4b50c245d3a767afb3/pandera/decorators.py#L484-L488
We will need to loop over positional and keywords arguments separately to ensure we reinject the positional arguments in the correct order here https://github.com/pandera-dev/pandera/blob/3191be9c1237eb07780c5c4b50c245d3a767afb3/pandera/decorators.py#L493
Expected behavior
Functions specifying a SchemaModel input (where coerce=True) and decorated with check_types should receive a dataframe with coerced types.