Skip to content
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

@cache_for_request doesn't work when method returns a Pandas dataframe #10

Closed
danielbenami opened this issue Feb 14, 2021 · 1 comment
Closed

Comments

@danielbenami
Copy link

Hello,

Thanks so much for putting this together. When I try to use @cache_for_request on class methods that return a Pandas dataframe I get the following error: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Exception Location: /Users/dbenami/Dev/ImpactTracker/src/ImpactTracker/lib/python3.7/site-packages/pandas/core/generic.py in nonzero, line 1479

Please let me know if there is more useful information I can share. In the meanwhile I still find your package useful for reducing sql queries.

@nezhar
Copy link
Collaborator

nezhar commented Oct 13, 2023

I'm unsure if the issue was linked to a previous version of pandas, but with the latest release, there are no problems, see #18

@nezhar nezhar closed this as completed Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants