vrozenbaum
9/13/2019 - 7:12 PM

lock Intersections and In

set(df1.columns).intersection(set(df2.columns))
#Find column names that exist in two dataframes

df['a_in_b'] = df.apply(lambda x: str(x.a) in str(x.b), axis=1)
#Boolean column to flag whethr values in one column exist in another