title: function is not persisting the the replacements
body: <p>I have a dataframe and I want to replace a string by another string. I am using this code:</p>
  <pre><code>df['text']=df['text'].map(lambda x: x.replace('%%user_article%%','a'))
  df['text']=df['text'].map(lambda x: x.replace('%%company_name%%','COMPANY'))
  </code></pre>
  <p>and it's working just fine.</p>
  <p>Now I want to define a function with the code above and I did:</p>
  <pre><code>  def r_tag(df):
              df=df.map(lambda x: x.replace('%%user_article%%','a') \
              .replace('%%company_name%%','COMPANY'))
              return df
  </code></pre>
  <p>and then <code>r_tag(df['text']</code></p>
  <p>The function above works but don't persist the replacements.
  How can I fix this?</p>