pandas comparison raises TypeError: cannot compare a dtyped [float64] array with a scalar of type [bool]

& has higher precedence than ==. Write:

my_df.ix[(my_df.CHUNK_NAME==chunks[0])&(my_df.LAMBDA==lam_beta[0][0])]

Leave a Comment

tech