comparison

Comparing two Dataframes and creating a third one where certain contions are met

Comparing two Dataframes and creating a third one where certain contions are met Question: I am trying to compare two different dataframe that have the same column names and indexes(not numerical) and I need to obtain a third df with the biggest value for the row with the same column name. Example df1= | | …

Total answers: 1

Comparing all contents of two files

Comparing all contents of two files Question: I am trying to compare two files. One file has a list of stores. The other list has the same list of stores, except it is missing a few from a filter I had run against it from another script. I would like to compare these two files, …

Total answers: 2

How to make a comparison of part of an array with one value

How to make a comparison of part of an array with one value Question: if x[3] > y and x[4] > y and x[5] > y and x[6] > y and x[7] > y and x[8] > y: … Do U have a more elegant method to compare it? actually, I have to compare one …

Total answers: 3

List of numbers have same data but different sum

List of numbers have same data but different sum Question: I have two lists of numbers. After comparing them with zip(), they are same (at least what I know) but there sum is different. You can get the script with list of numbers here as the script is huge, I cannot fix it in this …

Total answers: 1

Does the preprocessing of one algorithm change the conditions of the experiment?

Does the preprocessing of one algorithm change the conditions of the experiment? Question: As an example, We have two algorithms that utilize the same dataset and the same train and test data: 1 – uses k-NN and returns the accuracy; 2 -applies preprocessing before k-NN and adds a few more things, before returning the accuracy. …

Total answers: 1

How to compare 2 Ordered Dictionaries and create a new Ordered one with differences? (Python 3.7)

How to compare 2 Ordered Dictionaries and create a new Ordered one with differences? (Python 3.7) Question: I’m struggling on how to generate a "Differences" Ordered-Dictionary containing the Different and also New values appearing on a "Modified" Ordered-Dictionary after comparing with a "Reference" Ordered-Dictionary. EXAMPLE: #python from collections import OrderedDict ref_d = OrderedDict() # REFERENCE …

Total answers: 2

How to compare column in different dataframes for fragment of characters in python

How to compare column in different dataframes for fragment of characters in python Question: I have two dataframes of different size but common columns, with ID numbers as key column. I want to compare the column "names" in both dataframes. But sometimes the "names" does not match because there are upper cases or there are …

Total answers: 1