title: How to replace value in whole dataframe based on dictionary when part of string match?
body: <p>Hi I have 2 dataframes where i have to use 1 dataframe to replace the value in other. I can normally create the dictionary to replace values in whole dataframe but I have a bit different value in other dataframe so i need condition where i can tell if the part of the string is matched then it should map the dictionary. 
  The first dataframe is like this: </p>
  
  <p><a href="https://i.stack.imgur.com/zhJBO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zhJBO.png" alt="enter image description here"></a></p>
  
  <p>The second dataframe is like this:</p>
  
  <pre><code>        id        cars1                     cars2
  
          1     $ {hQOpelText.r1.val}        BMW
          2     $ {hQOpelText.r2.val}        $ {hQOpelText.r2.val}
          3     $ {hQOpelText.r3.val}        $ {hQOpelText.r5.val}
          4     $ {hQOpelText.r4.val}        Audi
          5     $ {hQOpelText.r5.val}        Audi
  </code></pre>
  
  <p>And i want resulted df like this:</p>
  
  <pre><code>        id        cars1                     cars2
  
          1     Opel Adam                   BMW
          2     Opel Astra Estate           Opel Astra Estate
          3     Opel Astra Hatchback        Opel Grandland x 
          4     Opel Astra Saloon           Audi
          5     Opel Grandland x            Audi
  </code></pre>