title: python pandas operations on columns
body: <p>Hi I would like to know the best way to do operations on columns in python using pandas.</p>
  
  <p>I have a classical database which I have loaded as a dataframe, and I often have to do operations such as for each row, if value in column labeled 'A' is greater than x then replace this value by column'C' minus column 'D'</p>
  
  <p>for now I do something like </p>
  
  <pre><code>for i in len(df.index):
      if df.ix[i,'A'] &gt; x :
          df.ix[i,'A'] = df.ix[i,'C'] - df.ix[i, 'D']
  </code></pre>
  
  <p>I would like to know if there is a simpler way of doing these kind of operations and more importantly the most effective one as I have large databases</p>
  
  <p>I had tried without the for i loop, like in R or Stata, I was advised to use "a.any" or "a.all" but I did non find anything either here or in the pandas docs.</p>
  
  <p>Thanks by advance.</p>