Pandas의 부울 색인 생성을위한 논리 연산자
팬더에서 부울 인덱스로 작업하고 있습니다. 문제는 진술이 왜 : a[(a['some_column']==some_number) & (a['some_other_column']==some_other_number)] 반면 잘 작동합니다 a[(a['some_column']==some_number) and (a['some_other_column']==some_other_number)] 오류와 함께 종료 하시겠습니까? 예: a=pd.DataFrame({'x':[1,1],'y':[10,20]}) In: a[(a['x']==1)&(a['y']==10)] Out: x y 0 1 10 In: a[(a['x']==1) and (a['y']==10)] Out: ValueError: The truth value of an array with more than one element is …