title: Pandas assign to slice
body: <p>I have some old python code that I have to transition from pandas 0.10 to 0.15 big jump.   The old python code has multiple assignments to slices using the following structure:</p>
  
  <pre><code>condition = a['Column'] != 'option' #  with lots of complex logic
  df.ColumnX[condition] = new_value
  </code></pre>
  
  <p>I know this is a an assigning to a slice.   In pandas 10 this worked, as documented in various pandas upgrades it does not work.    without having to refactor the code totally is the a way of changing line 2 so that it can still use the loc method while still using the condition as defined on line 1.    </p>
  
  <p>I have tried:</p>
  
  <pre><code>df.loc[:,condition] = 'new_val'
  </code></pre>
  
  <p>but I get</p>
  
  <blockquote>
    <p>IndexingError: Unalignable boolean Series key provided</p>
  </blockquote>
  
  <p>can anybody suggest a syntax that would (preferably backward compatible to pandas 0.10 that would provide quick fix without re-factoring dozens of complex selections?</p>