pandera
pandera copied to clipboard
AttributeError: Can't pickle local object 'Check.greater_than.<locals>._greater_than'
Describe the bug A clear and concise description of what the bug is.
- [x] 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 master 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
# Your code here
schema = pa.DataFrameSchema(
columns={"close": pa.Column(float, checks=[pa.Check.gt(0.0), ])},
checks=[pa.Check(lambda df: df['low'] < df['high'])]
)
with open("test.pkl", "wb") as f:
pickle.dump(schema, f)
Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
- OS: MacOS
- Version: 0.12.0
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.