title: merge series/dataframe with different time frequencies in python
body: <p>i am trying to merge two series, one in hour and another in minute (and keep the index at minute level):</p>
  
  <pre><code>Series A:
  
  time
  2017-09-01 01:00:00   0.5
  2017-09-01 02:00:00   0.4
  Freq: H, Name: A, dtype: float64
  </code></pre>
  
  <p>Series B in minute:</p>
  
  <pre><code>Series B
  
  time
  2017-09-01 00:00:00         NaN
  2017-09-01 00:03:00   -0.000350
  2017-09-01 00:06:00    0.000401
  Name: B, dtype: float64
  </code></pre>
  
  <p>I want to merge the two series by hour. And the desired merged dataframe would be:</p>
  
  <pre><code>time
  2017-09-01 00:00:00         NaN       0.5
  2017-09-01 00:03:00   -0.000350       0.5
  2017-09-01 00:06:00    0.000401       0.5
  2017-09-01 01:00:00    0.002301       0.4
  2017-09-01 01:03:00    0.005601       0.4
  </code></pre>
  
  <p>After searching on SO, one way I found is to create an 'hour' column in series B and then join A to B using the index of A and the 'hour' column of B: (reference: <a href="https://stackoverflow.com/questions/27080542/merging-combining-two-dataframes-with-different-frequency-time-series-indexes-in">Merging/combining two dataframes with different frequency time series indexes in Pandas?</a>)</p>
  
  <pre><code>B = B.to_frame()
  B['hour'] = B.index.to_period('H')
  merged = B.join(A, on = 'hour', how = 'left')
  </code></pre>
  
  <p>But I got error message:</p>
  
  <pre><code>TypeError: Argument 'values' has incorrect type (expected numpy.ndarray, got Index)
  </code></pre>
  
  <p>Does anyone know how to solve the issue? Or maybe there is a better way of joining the two series? Thanks a lot! </p>