title: Pandas change rows in DataFrame without assignment
body: <p>Say we have a Python Pandas DataFrame:</p>
  
  <pre><code>In[1]: df = pd.DataFrame({'A': [1, 1, 2, 3, 5],
                            'B': [5, 6, 7, 8, 9]})
  
  In[2]: print(df)
      A  B
   0  1  5
   1  1  6
   2  2  7
   3  3  8
   4  5  9
  </code></pre>
  
  <p>I want to change rows that match a certain condition. I know that this can be done via direct assignment:</p>
  
  <pre><code>In[3]: df[df.A==1] = pd.DataFrame([{'A': 0, 'B': 5}, 
                                     {'A': 0, 'B': 6}])
  
  In[4]: print(df)
      A  B
   0  0  5
   1  0  6
   2  2  7
   3  3  8
   4  5  9
  </code></pre>
  
  <p>My question is: Is there an equivalent solution to the above assignment that would <strong>return</strong> a new DataFrame with the rows changed, i.e. a <em>stateless</em> solution? I'm looking for something like <code>pandas.DataFrame.assign</code> but which acts on rows instead of columns.</p>