title: Subtraction if condition for Pandas dataframe
body: <p>I have temperature data that looks like this:</p>
  
  <pre><code>Date        State  Temperature (F)
  2018-10-6   AL     15
  2018-10-7   AL     45
  2018-10-8   AL     67
  2018-10-9   AL     25
  2018-10-10  AL     55
  2018-10-11  AL     77
  .
  .
  </code></pre>
  
  <p>I'd like to give a conditional statement that calculates a simple subtraction that creates a new column like this:</p>
  
  <pre><code>if df[Temperature, i] &lt; 65:
       df[Calculation, i] = 65 - df[Temperature, i]
  else:
       df[Calculation, i] = 0
  </code></pre>
  
  <p>So the output would be:</p>
  
  <pre><code>Date        State  Temperature (F)   Calculation
  2018-10-6   AL     15                0
  2018-10-7   AL     45                0
  2018-10-8   AL     67                2
  2018-10-9   AL     25                0
  2018-10-10  AL     55                0
  2018-10-11  AL     77                12
  .
  .
  </code></pre>
  
  <p>I'm not sure how to simply iterate over the column with this type of loop.</p>
  
  <p>Is there an easy way to do this?</p>