title: Replace string with respective matching one
body: <p>I need to replace the strings in df2 with the partially matching string in df1 .</p>
  
  <p>Like 1MG Solution has 1MG in df1 as well thus need to replace it with 1MG from df1 .
  This needs to be done for million records .</p>
  
  <pre><code>  &gt; df1
            A       
          1MG             
          ABOF          
          Amazon        
          American Swan
          Clovia       
  
      &gt; df2
  
  
        A                 B                                          
  1MG Solution           1MG
  ABOF Prime             ABOF
  Dual Command           NA
  Amazon AWF             AMazon
  American Swan Fi       AMerican Swan
  Clovia World Spaces    Clovia
  Shape Makers           NA
  Unions                 NA
  </code></pre>