Closed bryngarrod-habitatenergy closed 1 year ago
hey @bryngarrod-habitatenergy fun bug! Basically @check_types
uses the wrapt
library, which returns a FunctionWrapper
that somehow defines an __iter__
argument. This confuses pandas into thinking it's a list of aggregation functions.
Test case should probably live in this file: https://github.com/unionai-oss/pandera/blob/main/tests/core/test_decorators.py
If the
@pandera.check_types
decorator is used for a function that is called bypandas.DataFrame.apply
, it causesValueError: no results
.Code Sample
Expected behaviour
It should run without errors and the final check should return
True
.Currently, only the
iterrows
Version 1 runs without errors. If@pa.check_types
is removed then the whole script runs without errors and the final check returnsTrue
.Desktop