title: pandas element-wise comparison and create selection
body: <p>In a dataframe I would like to compare the elements of a column with a value and sort the elements which pass the comparison into a new column.</p>
  
  <pre><code>df = pandas.DataFrame([{'A':3,'B':10},
                         {'A':2, 'B':30},
                         {'A':1,'B':20},
                         {'A':2,'B':15},
                         {'A':2,'B':100}])
  
  df['C'] = [x for x in df['B'] if x &gt; 18]
  </code></pre>
  
  <p>I can't find out what's wrongs and why I get:</p>
  
  <blockquote>
    <p>ValueError: Length of values does not match length of index</p>
  </blockquote>