title: pandas dataframe return first word in string for column
body: <p>I have a dataframe:</p>
  
  <pre><code>df = pd.DataFrame({'id' : ['abarth 1.4 a','abarth 1 a','land rover 1.3 r','land rover 2',
                             'land rover 5 g','mazda 4.55 bl'], 
                     'series': ['a','a','r','','g', 'bl'] })
  </code></pre>
  
  <p>I would like to remove the 'series' string from the corresponding id, so the end result should be: </p>
  
  <p>Final result should be <code>'id': ['abarth 1.4','abarth 1','land rover 1.3','land rover 2','land rover 5', 'mazda 4.55']</code></p>
  
  <p>Currently I am using df.apply: </p>
  
  <pre><code>df.id = df.apply(lambda x: x['id'].replace(x['series'], ''), axis =1)
  </code></pre>
  
  <p>But this removes all instances of the strings, even in other words, like so:
  <code>'id': ['brth 1.4','brth 1','land ove 1.3','land rover 2','land rover 5', 'mazda 4.55']</code></p>
  
  <p>Should I somehow mix and match regex with the variable inside df.apply, like so?</p>
  
  <pre><code>df.id = df.apply(lambda x: x['id'].replace(r'\b' + x['series'], ''), axis =1)
  </code></pre>