title: Python - Replace abbreviation in text
body: <p>My dataframe has thousands of rows.<br>
  It look like this:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  text = ['please send us a dm...','…could you please dm me','dm me plz…','i dmed u yesterday…','dm me asap thx', 'i send a dm to u now', 'thx u r so nice dming u now', 'just sent u a dm']
  df = pd.DataFrame({"text": text})
  
            text
  0   please send us a dm...
  1   …could you please dm me
  2   dm me plz…
  3   i dmed u yesterday…
  4   dm me asap thx
  5   i send a dm to u now
  6   thx u r so nice dming u now
  7   just sent u a dm
  </code></pre>
  
  <p>I wrote a function to replace abbreviation in column 'text'.</p>
  
  <pre><code>def convert(dataframe, column):
      dataframe[column] = dataframe[column].apply(lambda x: x.replace(" dm ", " direct message "))
      dataframe[column] = dataframe[column].apply(lambda x: x.replace(" dming ", " direct message "))
      dataframe[column] = dataframe[column].apply(lambda x: x.replace(" dmed ", " direct message "))
      dataframe[column] = dataframe[column].apply(lambda x: x.replace(" plz ", " please "))
      dataframe[column] = dataframe[column].apply(lambda x: x.replace(" thx ", " thanks "))
      dataframe[column] = dataframe[column].apply(lambda x: x.replace(" u ", " you "))
      dataframe[column] = dataframe[column].apply(lambda x: x.replace(" asap ", " as soon as possible "))
      dataframe[column] = dataframe[column].apply(lambda x: x.replace("...", " "))
      dataframe[column] = dataframe[column].apply(lambda x: x.replace("…", " "))   
  </code></pre>
  
  <p>However, my code is not working properly, so it can't fully replace all of the abbreviations in my dataframe.</p>
  
  <pre><code>convert(df, 'text')
  
            text
  0   please send us a dm
  1   could you please direct message me
  2   dm me plz
  3   i direct message you yesterday
  4   dm me as soon as possible thx
  5   i send a direct message to you now
  6   thx you r so nice direct message you now
  7   just sent you a dm
  </code></pre>
  
  <p>The desired final output would look like this:  </p>
  
  <pre><code>          text
  0   please send us a direct message
  1   could you please direct message me
  2   direct message me plz
  3   i direct message you yesterday
  4   direct message me as soon as possible thanks
  5   i send a direct message to you now
  6   thanks you r so nice direct message you now
  7   just sent you a direct message
  </code></pre>
  
  <p>I can't figure out why my code is not working.  </p>