How to remove common features value from two Sframes

User 2724 | 12/3/2015, 9:36:46 AM

I have two Sframe created on images. Sframe contains row number, name, path, image an features attributes. I have extracted features by using imagenet model.

I have few images which are same in both the sframes. I want to remove these rows(images) from one of the sframe.

I tried below code but it throwed an error:- sframe1 = sframe1[sframe1['features'].apply(lambda x : x not in sframe2['features'])]

Error - RuntimeError: Runtime Exception. Invalid type conversion.

Please suggest how to remove common elements from both the sframes.


User 954 | 12/3/2015, 6:53:50 PM

Hi There,

Suppose sframe1 is the sframe that you want to remove the duplicates. The best way to do that is to (left)-join two SFrames first. sframe1.join(sframe2, on={'col1':'col2'}, how='left') Then, filter out all the rows that are None in the non-join attributes of sframe2.

User 2724 | 12/4/2015, 12:08:34 PM

Thanks Soroush!!