python 3.x - How to use compare several dataframes and return the matches using pandas -


if have several pandas dataframes this:

name       score sam        4 aaron      5 neil       6 ben        7  name       score morgan     5 neil       6 adam       8 ben        5  name       score evan       5 nathan     4 neil       6 ben        2 

how can use pandas.concat(join) join dataframes in 1 large 1 , return names found in 3 dataframes?

expected output:

name neil ben 

if interested in names, can intersection this

pd.series(list(set(df1.name) & set(df2.name) & set(df3.name)))  0    neil 1     ben 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -