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

前端 未结 1 1980
小蘑菇
小蘑菇 2020-12-01 05:34

I have the following structure to my dataFrame:

Index: 1008 entries, Trial1.0 to Trial3.84
Data columns (total 5 columns):
CHUNK_NAME                    1008         


        
相关标签:
1条回答
  • 2020-12-01 05:36

    & has higher precedence than ==. Write:

    my_df.ix[(my_df.CHUNK_NAME==chunks[0])&(my_df.LAMBDA==lam_beta[0][0])]
             ^                           ^ ^                            ^
    
    0 讨论(0)
提交回复
热议问题