If you want to check equalsequal values on a certain column, let's say NameName
, you can mergemerge
both DataframesDataFrames to a new one:
mergedStuff = pd.merge(df1, df2, on=['Name'], how='inner')
mergedStuff.head()
I think this is more efficient and faster thenthan where
if if you have a big data set.