Skip to main content
10000+ Posts
I would like to compare two sets in a PythonCaller and output the difference between these two sets.

Hi all, In the last few days we've set many small steps leading up to the problem we now have. We have polygons, where one attribute of each polygon is a list of bird species, which occur in that area. This list is of course different for all polygons, the polygon-specific list. We also have a list of bird species which should occur in that area. This list is the same for all polygons (in this subset), the general list. Now, we would like to compare the list of each polygon, with the list for all polygons. We have tried many transformers, and our last option (at the moment) is the PythonCaller, where we hardcode the second list as a set, and compare it with the polygon-specific list, converted to a set. We group by the id of the polygon, because we want to compare each polygon-specific list to the general list. This is our Python-code:import fmeimport fmeobjects x = {'item 1','item 2','item 3'} 

Badge Winners

Show all badges

Community Stats

32,343
Posts
122,979
Replies
40,417
Members