title: Edit pandas DataFrame using indexes
body: <p>Is there a general, efficient way to assign values to a subset of a DataFrame in pandas? I've got hundreds of rows and columns that I can access directly but I haven't managed to figure out how to edit their values without iterating through each row,col pair. For example:</p>
  
  <pre><code>In [1]: import pandas, numpy
  
  In [2]: array = numpy.arange(30).reshape(3,10)
  
  In [3]: df = pandas.DataFrame(array, index=list("ABC"))
  
  In [4]: df
  Out[4]: 
      0   1   2   3   4   5   6   7   8   9
  A   0   1   2   3   4   5   6   7   8   9
  B  10  11  12  13  14  15  16  17  18  19
  C  20  21  22  23  24  25  26  27  28  29
  
  In [5]: rows = ['A','C']
  
  In [6]: columns = [1,4,7]
  
  In [7]: df[columns].ix[rows]
  Out[7]: 
      1   4   7
  A   1   4   7
  C  21  24  27
  
  In [8]: df[columns].ix[rows] = 900
  
  In [9]: df
  Out[9]: 
      0   1   2   3   4   5   6   7   8   9
  A   0   1   2   3   4   5   6   7   8   9
  B  10  11  12  13  14  15  16  17  18  19
  C  20  21  22  23  24  25  26  27  28  29
  </code></pre>
  
  <p>I believe what is happening here is that I'm getting a copy rather than a view, meaning I can't assign to the original DataFrame. Is that my problem? What's the most efficient way to edit those rows x columns (preferably in-pace, as the DataFrame may take up a lot of memory)?</p>
  
  <p>Also, what if I want to replace those values with a correctly shaped DataFrame?</p>