1

I have two dataframe df look like this

Title Description Book ID
Title A randomDesc 14563
Title B randomDesc 22631
Title C randomDesc 09452
Title D randomDesc 87243

my 2nd dataframe have diffrnenet information

Book ID Date Rate user ID
14563 29/4/2021 8 90
22631 30/9/1990 6.5 87
09452 4/6/2000 4 90
87243 9/11/2017 9.5 30
22631 30/9/1990 9 30

I want to add title and Description data to the second data frame based on the book ID

bearcabin
  • 11
  • 1

1 Answers1

1

DataFrame.merge() might be a solution:

df2.merge(df1, how="left", on="Book ID")

hakanerdem
  • 83
  • 7