A = ((df['a'][-1:] + df['a'][1:])/2) B = ((df['a'][-1:]+df['b'][-1:]+df['b'][-1:]+df['d'][-1:])/4) if A < B print(1) ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
内容如上: