0

These are my dataframes:

DF1

0 Animals   0
1 Octopus   Aquatic
2 Fish      Aquatic
3 Mouse     Land
4 Cat       Land
5 Dolphin   Aquatic

DF2

0  Animals  0
1  Cat      Land
2  Fish     Aquatic
3  Shark    Aquatic

How I would like my result dataframe:

0  Animals  0
1  Fish     Aquatic
2  Cat      Land

Since the order of common elements vary, merge() isn't applicable here. Is there any other way to do this?

0 Answers0