title: Python: ufunc 'add' did not contain a loop with signature matching types dtype('S21') dtype('S21') dtype('S21')
body: <p>I have two dataframes, which both have an <code>Order ID</code> and a <code>date</code>. </p>
  
  <p>I wanted to add a flag into the first dataframe <code>df1</code>: if a record with the same <code>order id</code> and <code>date</code> is in dataframe <code>df2</code>, then add a <code>Y</code>:</p>
  
  <pre><code>[ df1['R'] = np.where(orders['key'].isin(df2['key']), 'Y', 0)]
  </code></pre>
  
  <p>To accomplish that, I was going to create a key, which would be the concatenation of the <code>order_id</code> and <code>date</code>, but when I try the following code:</p>
  
  <pre><code>df1['key']=df1['Order_ID']+'_'+df1['Date']
  </code></pre>
  
  <p>I get this error</p>
  
  <pre><code>ufunc 'add' did not contain a loop with signature matching types dtype('S21') dtype('S21') dtype('S21')
  </code></pre>
  
  <p>df1 looks like this: </p>
  
  <pre><code>Date | Order_ID | other data points ... 
  201751 4395674  ...
  201762 3487535  ...
  </code></pre>
  
  <p>These are the datatypes:</p>
  
  <pre><code>df1.info()
  RangeIndex: 157443 entries, 0 to 157442
  Data columns (total 6 columns):
  Order_ID                                 157429 non-null object
  Date                                     157443 non-null int64
  ...
  dtypes: float64(2), int64(2), object(2)
  memory usage: 7.2+ MB
  
  df1['Order_ID'].values
  array(['782833030', '782834969', '782836416', ..., '783678018',
         '783679806', '783679874'], dtype=object)
  </code></pre>