title: Replace values from one column with another column Pandas DataFrame
body: <p>I have a pandas dataframe df with ids as strings:
  I am trying to create the new_claim and new_description columns</p>
  
  <p><a href="https://i.stack.imgur.com/i6yCe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i6yCe.png" alt="example df"></a></p>
  
  <p>Closest SO I found was <a href="https://stackoverflow.com/questions/50583265/efficiently-replace-part-of-value-from-one-column-with-value-from-another-column">Efficiently replace part of value from one column with value from another column in pandas using regex?</a> but this uses split part, and since the description changes I was unable to generalize. </p>
  
  <p>I can run a one off</p>
  
  <pre><code>date_reg = re.compile(r'\b'+df['old_id'][1]+r'\b')
  
  df['new_claim'] = df['claim'].replace(to_replace=date_reg, value=df['external_id'], inplace=False)
  </code></pre>
  
  <p>But if I have</p>
  
  <pre><code>date_reg = re.compile(r'\b'+df['claim']+r'\b')
  </code></pre>
  
  <p>Then I get "TypeError: 'Series' objects are mutable, thus they cannot be hashed"</p>
  
  <p>Another approach I took</p>
  
  <pre><code>df['new_claim'] = df['claim']
  
  for i in range(5):
      old_id = df['old_id'][i]
      new_id = df['external_id'][i]
  
      df['new_claim'][i] = df['claim'][i].replace(to_replace=old_id,value=new_id)
  </code></pre>
  
  <p>which givesa TypeError: replace() takes no keyword arguments</p>