title: How to conditionally update DataFrame column in Pandas
body: <p>With this DataFrame, how can I conditionally set <code>rating</code> to 0 when <code>line_race</code> is equal to zero? </p>
  
  <pre><code>    line_track  line_race  rating foreign
   25        MTH         10     84    False
   26        MTH          6     88    False
   27        TAM          5     87    False
   28         GP          2     86    False
   29         GP          7     59    False
   30        LCH          0    103     True
   31        LEO          0    125     True
   32        YOR          0    126     True
   33        ASC          0    124     True
  </code></pre>
  
  <p>In other words, what is the proper way on a DataFrame to say if ColumnA = x then ColumnB = y else ColumnB = ColumnB</p>