Why does the first line work but not the second?
ok:
data_frame['C'] = np.where(np.logical_and(np.greater_equal(data_frame['A'],1), np.not_equal(data_frame['B'],0)), 'OK', '-' )
not ok:
data_frame['C'] = np.where(data_frame['A']== 1 & data_frame['B']!=0, 'OK', '-')
TypeError: Cannot perform
rand_
with a dtyped[float64]
array and scalar of type[bool]]