0
나는 다음과 같은 코드를 사용하여 두 개의 컬럼의 값을 비교하기 위해 노력하고있어 :팬더에 두 개의 열을 비교
if df['predicted_spread'] > df['vegas_spread']:
total_bet += 1
그것은 다음과 같은 오류를 반환 :
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
어떤 생각을 어떻게 할 수 이것을 고쳐라?
이것 좀보세요 : http://stackoverflow.com/questions/10062954/valueerror-the-truth-value-of-an-array-with-more-than-one-element-is-abiguous – wwl
너 먼저 논리를 확인해야하며, 무엇을 달성하기를 원합니 까? 'df [ 'predicted_spread']> df [ 'vegas_spread']'는 논리 값을 기대하는 동안 논리 계열을 반환합니다. – Psidom