pandas retrieve matching columns in two 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
df3 = [(df2.type.isin(df1.type)) & (df1.value.between(df2.low,df2.high,inclusive=True))]
df1.join(df3)