title: How do I assign values based on multiple conditions for existing columns?
body: <p>I would like to create a new column with a numerical value based on the following conditions:</p>
  <p>a. <code>if gender is male &amp; pet1==pet2, points = 5</code></p>
  <p>b. <code>if gender is female &amp; (pet1 is 'cat' or pet1 is 'dog'), points = 5</code></p>
  <p>c. all other combinations, <code>points = 0</code></p>
  <pre class="lang-none prettyprint-override"><code>    gender    pet1      pet2
  0   male      dog       dog
  1   male      cat       cat
  2   male      dog       cat
  3   female    cat       squirrel
  4   female    dog       dog
  5   female    squirrel  cat
  6   squirrel  dog       cat
  </code></pre>
  <p>I would like the end result to be as follows:</p>
  <pre class="lang-none prettyprint-override"><code>    gender    pet1      pet2      points
  0   male      dog       dog       5
  1   male      cat       cat       5
  2   male      dog       cat       0
  3   female    cat       squirrel  5
  4   female    dog       dog       5
  5   female    squirrel  cat       0
  6   squirrel  dog       cat       0
  </code></pre>
  <p>How do I accomplish this?</p>