內的兩個條件,我期待篩選出其中兩個列中的值等於0和1。以下是我在這樣的嘗試,但沒有取得任何結果的任何行。使用熊貓據幀過濾
x = x[x.value_1 != 0 and x.value_2 !=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/21415661/logic-operator-for-boolean-indexing-in-pandas?rq=1) – bunji