Compare Elements from Two Dataframe Lists

59
June 15, 2021, at 09:00 AM

I need to compare two lists, each from a different data frame. It should be: if element in List 3 is not in List 1 AND element in List 5 is not in List 1 AND element in List 4 IS in List 2, then print the elements in List 3. My problem is that I don't know how to reference the elements in List 2. Here is what I've tried so far:

list_12 = df1[["List 1", "List 2"]].values  #DataFrame1
list_3456 = df2[["List 3", "List 4", "List 5", "List 6"]].values  #DataFrame2
for element in list_3456:
    if element[0] not in list_12.item[0] and element[2] not in list_12.item[0] and element[1] in list_12.item[1]:
            print(element[0])  # print List 3 elements 
READ ALSO
Can sonarlint be used in place of checkstyle?

Can sonarlint be used in place of checkstyle?

I am working on a project which already has sonarqube integratedNow, we want to have a plugin in our local IDE(with some sort of XML) so that everyone in the team can have the same set of rules

61
subdomain routing | DNS ZONE | CNAME Record

subdomain routing | DNS ZONE | CNAME Record

Helo! I hope I asked the right question in the title

29
Apply jQuery before add to cart action in woo-commerce word press

Apply jQuery before add to cart action in woo-commerce word press

I need a confirmation popup before user proceed to add to cartIf user click to yes in confirmation box then should add product to cart and redirect to cart page as what happens in normal flow, in woo commerce wordpress

63
Sum document fields where the reference id is equal

Sum document fields where the reference id is equal

I have these documents with the following structure:

59