I am trying to emulate a circumstance where i send information and only get a true or false as a return. So i can check each character and if it is true, that means that character is in the string. I would know there would be a position 0 to some number x. I would receive a true result and
Tag: compare
compare 2 string columns in data frame and add 1 to key if different
I’m having a hard time trying to figure this out, I have a data frame with multiple columns after merging 2. I have 2 list: I need to compare each group of variables and if they are different add 1 to the key column I was trying to use something like this: Answer I would avoid loops. Is there any
Comparing two text files and the matches go to a new file
In python I would like to find a way to compare two text files and read one line by line and find it’s match if any in the other file. If they match I would like to take that string and write it to a new file. I do not know how I would even start this the only thing
How to find the difference between two lists of dictionaries for a specific value?
I have two lists of dictionaries and I’d like to find the difference between them (i.e. what exists in the first list but not the second, and what exists in the second list but not the first list). I want to find the values in the list that are different from each other in terms of location and country. That
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 compare 2 different csv files and output the differences without CSV-diff
I have 2 CSVs which are New.csv and Old.csv shown below: New.csv Old.csv If there is a longName (first column) in in the new.csv that is not in the old.csv, I would like that entire new.csv row to be appended to the changes.csv. The current code below is done with csv-diff which seems be a bit glitchy and hard to
Compare string like ‘1,2,3’ and ‘3,1,2’ to be set as equals in Python [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question I have a strings like ‘1,2,3’ and ‘3,1,2’in a list, is there any way to compare these two strings and check that they are the
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