只能比较标记相同的DataFrame对象

时间:2018-12-11 21:30:21

标签: python pandas dataframe

我有两个相同的DataFrames,但是当我尝试比较两者时,出现上述错误:

ValueError: Can only compare identically-labeled DataFrame objects

以下是代码段:

delta = qrdf[ dfbN != qrdf ].dropna(how="all")

Qr形状:(788,9)<---双方的cols数相同 Dfb形状:(13269,9)<---两者上的cols数量相同

两个标签上的标签完全相同:     ['time_received','severity','threatid','device_name','src','dst','subtype','@ logid','srcloc']     ['time_received','severity','threatid','device_name','src','dst','subtype','@ logid','srcloc']

:(

0 个答案:

没有答案