pandas compare column in 2 dataframes code example
Example 1: comparing two dataframe columns
comparison_column = np.where(df["col1"] == df["col2"], True, False)
Example 2: pandas compare two columns of different dataframe
df1['priceDiff?'] = np.where(df1['Price1'] == df2['Price2'], 0, df1['Price1'] - df2['Price2'])