0

I have got two dataframes as below:

df1       Id    B      C                                                                              
          Id1   14     0.3   
          Id2   11     0.5    
          Id3   21     0.2   
          Id4   17     0.1   
          Id5   28     0.1  

df2      Id    E      Country                                                                             
         Id1   14     India 
         Id2   11     US  
         Id5   28     US

I wish to concat the df2.country column to df1 where df1.Id==df2.Id I know it's like SQL join but I am confused how to achieve this in pandas.

0 Answers0