Merge and exclude in one command.

User 1129 | 2/9/2016, 10:24:38 AM

Consider two data frames: a:

x,y,z a,b,1 a,c,2 a,d,3 and b: x,y,z a,x,10 a,b,20 I would like to do a left join the two data frames such that their x columns match AND their y columns don't. Right now, I perform this in two steps:

tmp = a.join(b, on='x', how='left') result = tmp[tmp['y'] != tmp['y.1']]

The problem is that in real life situations, the intermediate table is much larger that the desired final result. Is there a way to achieve this effect in one command, without the need to create a temporary object?


User 1592 | 2/15/2016, 8:25:21 AM

Hi This is not possible yet. We have added this to our feature requests and keep you posted once we implement it.