0

I have two dataframes: df1 has columns - id, Text, imageid, label df2 has columns - imageid, imageurl

I want to combine both the dataframes such that the imageurl should be linked to their corresponding imageid in df1.

Can someone guide me how to do this?

1 Answers1

0

Use pandas.merge() to merge dataframes based on a common column:

df = pd.merge(df1,df2, on='imageid',how='left')
df.head()
Prakash Dahal
  • 4,388
  • 2
  • 11
  • 25