I got this error
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Let be x an array of continuous numerical values between 0 and 10
dts1['NewCol'] = np.apply_along_axis(getbool,axis=0, arr=x)
Let be getbool a function which returns 1 if the numerical value is more than 5 and 0 otherwise
def getbool(x):
if x > 5:
return 1
else:
return 0