Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sample = D1.merge(D2,left_on=[ 'A' or'B' or'C'or 'D' or E],
- right_on=['A'], how='left')
- sample = pd.concat([D1.merge(D2,left_on='A', right_on= 'A', how='left'),
- D1.merge(D2,left_on='B', right_on='A', how='left'), D1.merge(D2,
- left_on='C',right_on='A', how='left'),D1.merge(D2,left_on='D',
- right_on='A', how='left'),D1.merge(D2,left_on='E', right_on='A',
- how='left')])
- dupes = (sample['A'] == sample['B']) == (sample['C'] == sample['D']) ==
- sample['E']
- sample=sample.loc[~dupes]
- ValueError: The truth value of a Series is ambiguous. Use a.empty,
- a.bool(), a.item(), a.any() or a.all().
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement