I am new to learning numpy. I write the statement as follows to count the number of Buy and Sell, but doesnt work.
count = np.where(((df.Buy == 1) & (df.Sell== 0)), count + 1, count)
and return error message:
ValueError: operands could not be broadcast together with shapes (9,) (0,) (0,)
Any suggestion. Thanks