title: Python partial string match using list comprehension
body: <p>I am trying to use list comprehensions to edit a list based on partial string match. I need to replace all elements in <code>group</code> column of df which contains <code>L</code> with <code>Left</code></p>
  
  <pre><code>['Left' if x.str.contains('L') else x for x in df['group']]
  </code></pre>
  
  <p>It wont let me apply str.contains or <code>'L' in x</code>. For latter it says <code>argument of type 'float' is not iterable</code></p>
  
  <p>Any suggestion would be welcome. </p>
  
  <p><strong>EDIT: ADDING DATA</strong></p>
  
  <pre><code>import pandas as pd
  df=pd.DataFrame()
  df['group']=[u'L1', u'L2', u'L3', u'R1', u'R2', u'R3']
  </code></pre>