Skip to content
Advertisement

Tag: compare

Compare two arrays and print out Index of row in python

I have two arrays A and B I want to compare a couple of the elements of A[:,2:4] with couple elements of B[:,2:4] and print out the rows where they are equal or approximate? Here is my approach just for only A[:,3] How can I do it with both A[:,2] and A[:,3] ? Many thanks Answer I think you are

Comparing two lists with specific values to read

I have two lists and when I loop through the list and I managed to get the difference, but I need time as well because it is a separate item and ‘uvz’ does not mean to me anything in the list with a few thousand entries. I tried to convert it to the dictionary, but it overwrites with the last

comparing a number of lists in pairs

I have problem with 4 list each one got 4 number: P1= [3,1,3,4] P2= [5,4,3,7] P3= [7,4,8,1] P4= [10,3,2,1] I need to get the biggest number in combinational way like: Pair of 2: p1p2, p1p3, p1p4, p2p3, p2p4, p3p4 Pairs of 3: p1p2p3, p1p2p4, p1p3p4, p2p3p4 Pairs of 4: p1p2p3p4 The result for: p1p2= [5,4,3,7] p1p3= [7,4,8,4] p1p4= [10,3,3,4] ……

How to tell if a date is between two other dates?

I have the following codes: date, start and end are all variables with the format of 1/1. What should I do to have it print out the right result? i tried date as 10/2, start as 3/14 and end as 11/7 and it’s print ‘No!’, which means it’s not running right. I guess have to format them to a date

Advertisement