0

Two data frames df1 and df2

Need to join user_id of df1 with id of df2

where i will pass user_id of df1 and id of df2

df1.merge(df2, how=left)

1 Answers1

1

You can do

df1.merge(df2, how='left', left_on='user_id', right_on='id')
ignoring_gravity
  • 6,677
  • 4
  • 32
  • 65