0

I am trying to merge multiple dataframes and create a new dataframe containing only the common the rows. For example:

The dataframes that i have as input:enter image description here The dataframe that i want to have as output:enter image description here

Do you know if there is a way to do that? If you could help me, i would be more than thankfull!! Thanks, Eleni

eleni.ps
  • 43
  • 3

1 Answers1

1

You want df.merge:

df = df1.merge(df2, how='inner', indicator=False)
        .merge(df3, how='inner', indicator=False)
Rahul
  • 1,056
  • 2
  • 9
  • 26