title: Python Pandas -- mapping the values in two data frames
body: <p>I have two dataframes <code>df1</code> and <code>df2</code>. </p>
  
  <p>I am trying to figure out the best way to perform a mapping that for each row in <code>df1</code>, I would like to search for a match (<code>id</code>, <code>time_by_hour</code>) in <code>df2</code> and then fill the corresponding value in <code>df2</code> back into <code>df1</code>. </p>
  
  <p>Below is the <code>df1_final</code> as I would like it to look finally.</p>
  
  <p>Thank you in advance!</p>
  
  <pre><code>df1
  Out[100]: 
    id             time_by_min        time_by_hour  value
  0  a 2017-06-30 01:25:00.000 2017-06-30 02:00:00    NaN
  1  a 2017-06-30 01:36:32.308 2017-06-30 02:00:00    NaN
  2  a 2017-06-30 02:25:00.000 2017-06-30 03:00:00    NaN
  3  a 2017-06-30 02:36:32.308 2017-06-30 03:00:00    NaN
  4  b 2017-06-30 01:25:00.000 2017-06-30 02:00:00    NaN
  5  b 2017-06-30 01:36:32.308 2017-06-30 02:00:00    NaN
  6  b 2017-06-30 02:25:00.000 2017-06-30 03:00:00    NaN
  
  df2
  Out[101]: 
    id        time_by_hour  value
  0  a 2017-06-30 02:00:00    100
  1  a 2017-06-30 03:00:00    200
  2  b 2017-06-30 02:00:00    150
  3  b 2017-06-30 03:00:00     30
  4  c 2017-06-30 02:00:00     80
  5  c 2017-06-30 03:00:00    900
  
  df1_final
  Out[102]: 
    id             time_by_min        time_by_hour  value
  0  a 2017-06-30 01:25:00.000 2017-06-30 02:00:00    100
  1  a 2017-06-30 01:36:32.308 2017-06-30 02:00:00    100
  2  a 2017-06-30 02:25:00.000 2017-06-30 03:00:00    200
  3  a 2017-06-30 02:36:32.308 2017-06-30 03:00:00    200
  4  b 2017-06-30 01:25:00.000 2017-06-30 02:00:00    150
  5  b 2017-06-30 01:36:32.308 2017-06-30 02:00:00    150
  6  b 2017-06-30 02:25:00.000 2017-06-30 03:00:00     30
  </code></pre>