title: Edit pandas dataframe row-by-row
body: <p>pandas for python is neat. I'm trying to replace a list-of-dictionaries with a pandas-dataframe. However, I'm wondering of there's a way to change values row-by-row in a for-loop just as easy?</p>
  
  <p>Here's the non-pandas dict-version:</p>
  
  <pre><code>trialList = [
      {'no':1, 'condition':2, 'response':''},
      {'no':2, 'condition':1, 'response':''},
      {'no':3, 'condition':1, 'response':''}
  ]  # ... and so on
  
  for trial in trialList:
      # Do something and collect response
      trial['response'] = 'the answer!'
  </code></pre>
  
  <p>... and now <code>trialList</code> contains the updated values because <code>trial</code> refers back to that. Very handy! But the list-of-dicts is very unhandy, especially because I'd like to be able to compute stuff column-wise which pandas excel at. </p>
  
  <p>So given trialList from above, I though I could make it even better by doing something pandas-like:</p>
  
  <pre><code>import pandas as pd    
  dfTrials = pd.DataFrame(trialList)  # makes a nice 3-column dataframe with 3 rows
  
  for trial in dfTrials.iterrows():
     # do something and collect response
     trials[1]['response'] = 'the answer!'
  </code></pre>
  
  <p>... but <code>trialList</code> remains unchanged here. Is there an easy way to update values row-by-row, perhaps equivalent to the dict-version? It is important that it's row-by-row as this is for an experiment where participants are presented with a lot of trials and various data is collected on each single trial.</p>