简体   繁体   English

比较熊猫中的两个数据框

[英]Compare two dataframe in pandas

I am trying to compare two different data frames of pandas.我正在尝试比较熊猫的两个不同数据框。 Both the data set are identical but the data frame equal gives false.两个数据集相同,但数据框相等给出错误。 (df3 == df4) . (df3 == df4) 。 Why df2 == df3 gives false for each row ?为什么 df2 == df3 为每一行给出 false ? 在此处输入图片说明

use the equals method使用equals方法

df3.equals(df4)

You can also compare two df with compare您也可以比较两个df比较


Here is an issue talking about None is not equal to None这是一个关于None 不等于 None 的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM