title: Conditional appending of data to a pandas dataframe
body: <p>I am fairly new in Python. I have two pandas data frames <code>ak12_01</code> and <code>T01</code></p>
  
  <p><code>ak12_01
    objectid, coordID, year, doy
  0 495395    5497     2001  120</code>
  and</p>
  
  <p><code>T01
    coordID, year,  1,  2,  3, ...
  0 5497     2001  249 251 231 ...
  1 5498     2001  239 231 251 ...</code></p>
  
  <p>I want to add a given value from <code>T01</code> to <code>ak12_01</code> on two conditions:</p>
  
  <p>1) if <code>T01['coordID'] == ak12_01['coordID']</code></p>
  
  <p>2) if <code>T01(column name) == ak12_01['doy'].</code>
  In the <code>T01</code> dataset, the column names represent the <code>doy</code> (day of the year)</p>
  
  <p>I get an error when comparing the '<code>coordID</code>' from the two dataset as they are not equally long (<em>Can only compare identically-labeled Series objects</em>). Is there a smart way of adding the given value from <code>T01</code> to <code>ak_12_01</code> based on these to conditions?</p>