jeudi 6 février 2020

'bitwise_and' not supported in python if statement

I have the following if statement:

if data_symbol['Open'].iloc[2] > data_symbol['Open'].iloc[1] & (data_symbol['Close'].iloc[2] < data_symbol['Close'].iloc[1]) :
        print(symbols)

which is producing this error:

TypeError: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

Why is it producing this error?

Aucun commentaire:

Enregistrer un commentaire