As the title says. I am having some difficulties comparing list A with list B to determine the differences between each list. In the image below, the list are exactly the same except that list A had (4) items with the value of 269732 and list B has (5) items with the value 269732. What I want to happen is to compare the lists and get a result stating that the differences between the lists is a single value of 269732. I have tried useing Set.Difference but keep getting empty lists as a result. Even when switching the lacing, I do not get the expected result.
I gave it a shot with no luck. It looks as though the SetIntersection node returns a list of only the unique intersections from each list. Meaning, it does not return a list with multiple values of the same item, if they exist. I suspect that this might be part of the issue, but I am not sure how to approach it? Just to clarify, one list input into List.join has (5) items with the value of 269732 and the other has (3) values of 269732 but the resulting SetIntersection only lists (1)
This should work in the context of the example you provided, assuming that both lists contain the same amount of unique items. If that is not the case you would have to expand a bit on my code.
PS: @leonard.moelders that wouldn’t work in this case, since both lists are not equal in length.
Python makes it really easy to count the number of occurrences. Along with the unique set, this allows you to create a simple dictionary pretty easily, regardless of number of items in any list.