title: Replace values in Pandas Dataframe with regex if value doesn't contain string
body: <p>I have a pretty big dataframe (around 15M rows on 7 columns) and i would like to replace some values that are not having the right shape.</p>
  
  <p>I tried to iterate all over the dataframe but it takes way too long to change the values one by one. 
  I also tried to use regex but i couldn't find how to replace if the string doesn't match the regex with pandas.</p>
  
  <p>My dataframe column looks like : <br>
  <code>1 : L8_P1_Local
   2 : L8
   3 : L8_P1_Local
   4 : L8
   5 : poste2
   6 : poste6
   7 : poste2
   8 : Poste 2
   9 : poste_6</code></p>
  
  <p>EDIT: Sometimes the poste2 and poste6 are different like Poste 2 or poste_2 or Poste_2
  Does this regex would match everything ? [pP]oste[\s]*[_]*[0-9]</p>
  
  <p>What I'm trying to do is like having the L8 on every row in front of poste2 or poste6 so it would be like <code>L8_poste6</code>. I do have the 'L8' string in a variable called <code>numline</code>.</p>
  
  <p>Edit: Because the answer was in the accepted's answer comment's I will put it down here.</p>
  
  <p><code>text = numligne +'_\\1'
  dataframe['row'] = dataframe['row'].str.replace('([pP]oste[ _]*[0-9])', text)</code></p>