Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all(). HELP!!!

Hi.
I'm encountering a problem in my code when entering this:

price = data.history(context.assets, "price", 1, "1m")
if price.any() % 1 == 0:
indented here price = "a dollar amount"

How can I fix this problem?
Thanks for the help!