执行的代码:

1、报错如下:

ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

2、应该修改如下(注:别忘记了表达式两边加括号):