比较单个数据框中两行的数据

2024-09-29 23:30:17 发布

您现在位置:Python中文网/ 问答频道 /正文

MasterAgreementId   MasterAgreementType Data Source Break Type
11000002    ISDA    Source System   
11000002    ISDA    CMRS    
11000043    ISDA    CMRS    
11000049    ISDA    Source System   
11000049    ISDA    CMRS    
1451057679  ISDA    Source System   

我有一个数据帧包含这样的数据。我想使用MasterAgreementId作为比较的键,并希望输出如下:

MasterAgreementId   MasterAgreementType Data Source Break Type
11000002    ISDA    Source System   Identical
11000002    ISDA    CMRS    Identical
11000043    ISDA    CMRS    Difference
11000049    ISDA    Source System   Identical
11000049    ISDA    CMRS    Identical
1451057679  ISDA    Source System   Difference

我想实现这一点而不需要迭代


Tags: 数据sourcedatatypesystembreakdifferenceidentical

热门问题