title: How to only replace substring not entire string?
body: <p>I have a dictionary that looks like this:</p>
  
  <pre><code>global_dict_names=dict{'com':'owb_com','cur':'cur_con','cty':'gds_cty','cur':'gds_cur'}
  </code></pre>
  
  <p>My dataframe looks like this:</p>
  
  <pre><code>com12  cur34  cty56  cur78
    a     b      c      d
    b     c      d      e
  </code></pre>
  
  <p>I would like my dataframe to look like this:</p>
  
  <pre><code> owb_com12   cur_con34    gds_cty56    gds_cur78
    a             b            c          d
    b             c            d          e
  </code></pre>
  
  <p>My current code looks like this:</p>
  
  <pre><code>GDS2018_labels.columns = [global_dict_names.get(x[:3], x) for x in 
  GDS2018_labels.columns]
  </code></pre>
  
  <p>This current code matches the first three characters of the column names with the keys from the dictionary. The problem with this code is that it replaces the entire column name, but I only want to replace the substring of the column name that matches with the key. How can I correct this?</p>