title: Upsampling Dataframe in Pandas with Index + Column
body: <p>Given a dataframe indexed by month, I'd like to reindex by day (upsample). Values that were previously indexed by month should now be divided by the number of days in the month. In addition to the index, a column should be used in the grouping. Similar to <a href="https://stackoverflow.com/questions/40878170/upsampling-dataframe-in-pandas#">this</a> - just with a column also being used in the grouping.</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  
  np.random.seed(1234)
  tidx_m = pd.date_range('2011-01-31', periods=5, freq='M')
  df = pd.DataFrame(np.random.randint(0, 2, (5, 2)), columns=['class', 'val'])
  df.index = tidx_m
  df = pd.concat([df, df])
  df.ix[:5, 'class'] = 0
  df.ix[5:, 'class'] = 1
  print(df)
  
              class  val
  2011-01-31      0    1
  2011-02-28      0    1
  2011-03-31      0    0
  2011-04-30      0    1
  2011-05-31      0    1
  2011-01-31      1    1
  2011-02-28      1    1
  2011-03-31      1    0
  2011-04-30      1    1
  2011-05-31      1    1
  </code></pre>
  
  <p>After upsampling the index to days instead of months, I'd like to group by the Datetime index <em>and</em> <code>class</code>. Values in "val" should be redistributed throughout all days in the month (e.g. 1 becomes 1 / 31 for each day in January).</p>