title: Pandas Dataframe timeseries
body: <p>I want to build a dataframe with datetimestamp (upto minutes) as index and keep adding columns as I get data for each new column. For example, for Col-A, I aggregate by day, hour and minute from another dataset to a value 'k'. I want to insert this value 'k' into a dataframe at the 'right' row-index. The problem I am facing is the current row-identifier is from a groupby object on date,hour, min. Not sure how to 'concatenate' these 3 into a nice timeseries type.</p>
  
  <p>This is what I have currently (output of my groupby object):</p>
  
  <pre><code>currGroupedData = cData.groupby(['DATE', 'HOUR', 'MINUTE'])
  numUniqValuesPerDayHrMin = currGroupedData['UID'].nunique()
  print numUniqValuesPerDayHrMin
  
  Computing Values for A:
  DATE      HOUR  MINUTE
  2015-08-15  6     38        65
  Name: UID, dtype: int64
  </code></pre>
  
  <p>To form a new dataframe to hold many columns (A, B, .., Z), I am doing this:</p>
  
  <pre><code>index = pd.date_range('2015-10-05 10:00:00', '2015-11-10 10:00:00', freq='1min')
  df = pd.DataFrame(index=index)
  </code></pre>
  
  <p>Now, I want to 'somehow' take the value 65 and populate into my dataframe. How do I do this? I must somehow convert the "date, hour, minute" form groupby object to a timeseries obj...???</p>
  
  <p>Also, I will have a series of values for Col-A for many mins of that day. I want to, in one-shot, populate an entire column with those values and fill the rest with '0s'. Then, move on processing/filling the next column.</p>
  
  <p>Can I do this:</p>
  
  <pre><code>str = '2015-10-10 06:10:00'
  
  str
  Out[362]: '2015-10-10 06:10:00'
  
  pd.to_datetime(str, format='%Y-%m-%d %H:%M:%S', coerce=True)
  Out[363]: Timestamp('2015-10-10 06:10:00')
  
  row_idx = pd.to_datetime(str, format='%Y-%m-%d %H:%M:%S', coerce=True)
  
  type(row_idx)
  Out[365]: pandas.tslib.Timestamp
  
  data = pd.DataFrame({'Col-A': 65}, index = pd.Series(row_idx))
  df.add(data)
  </code></pre>
  
  <p>Any thoughts?</p>