必须用括号,应为&运算优先级比==高
a[(a['some_column']==some_number) & (a['some_other_column']==some_other_number)]
works fine whereas
a[(a['some_column']==some_number) and (a['some_other_column']==some_other_number)]
exists with error?
细节请看
必须用括号,应为&运算优先级比==高
a[(a['some_column']==some_number) & (a['some_other_column']==some_other_number)]
works fine whereas
a[(a['some_column']==some_number) and (a['some_other_column']==some_other_number)]
exists with error?
细节请看