最佳答案
我使用熊猫来比较两个文件的输出加载到两个数据帧(uat,prod) : ...
uat = uat[['Customer Number','Product']]
prod = prod[['Customer Number','Product']]
print uat['Customer Number'] == prod['Customer Number']
print uat['Product'] == prod['Product']
print uat == prod
The first two match exactly:
74357 True
74356 True
Name: Customer Number, dtype: bool
74357 True
74356 True
Name: Product, dtype: bool
对于第三张照片,我得到一个错误: Can only compare identically-labeled DataFrame objects. If the first two compared fine, what's wrong with the 3rd?
谢谢