title: Pandas add column with values from two df on partly matching column
body: <p>I have an easy question most likely but still am stuck on how to solve what I want.
  I have a two dataframes which match one column &quot;giftID&quot; and want to create a new column in df1 adding the values from df2 matching the giftID. I tried it with np.where and all different kinds but can't get it working.</p>
  <pre><code>df = pd.read_csv('../data/gifts.csv')
  trip1 =df[:20].copy()
  trip1['TripId']=0
  subtours = [list(trip1['GiftId'])] * len(trip1)
  trip1['Subtour'] = subtours
  
  trip2 = df[20:41].copy()
  #trip2['Subtour'] = [s]*len(trip2)
  trip2['TripId']=1
  trip2['Subtour'] = subtours = [list(trip2['GiftId'])] * len(trip2)
  mini_tour = trip1.append(trip2)
  grouped = mini_tour.groupby('TripId')
  SA = Simulated_Anealing()
  wrw = 0
  for name, trip in grouped:
      tourId = trip['TripId'].unique()[0]
      optimized_trip,wrw_c = SA.simulated_annealing(trip)
      wrw += wrw_c
      subtours = [optimized_trip]*len(trip)
      mask = mini_tour['TripId'] ==  tourId
      mini_tour.loc[mask,'Subtour'] = 0
  </code></pre>
  <p>Input:</p>
  <pre><code>df  giftID  weight  
  1    A      4      
  2    B      5      
  3    C      6  
  4    D      7   
  5    E      12  
  
  df1  giftID  subtour
  1    A       1, 3, 4
  2    B       1, 3, 4
  3    C       1, 3, 4
  
  df2  giftID  subtour
  1    D       2, 5, 8
  2    E       2, 5, 8
  
  </code></pre>
  <p>Output:</p>
  <pre><code>df  giftID  weight  subtour
  1    A      4       1, 3, 4
  2    B      5       1, 3, 4
  3    C      6       1, 3, 4
  4    D      7       2, 5, 8
  5    E      12      2, 5, 8
  </code></pre>