title: How to resample a Pandas dataframe of mixed type?
body: <p>I generate a mixed type (floats and strings) Pandas DataFrame df3 with the following Python code:</p>
  
  <pre><code>df1 = pd.DataFrame(np.random.randn(dates.shape[0],2),index=dates,columns=list('AB'))
  df1['C'] = 'A'
  df1['D'] = 'Pickles'
  df2 = pd.DataFrame(np.random.randn(dates.shape[0], 2),index=dates,columns=list('AB'))
  df2['C'] = 'B'
  df2['D'] = 'Ham'
  df3 = pd.concat([df1, df2], axis=0)
  </code></pre>
  
  <p>When I resample df3 to a higher frequency I don't get the frame resampled to a higher rate but the how is ignored and I just get missing values:</p>
  
  <pre><code>df4 = df3.groupby(['C']).resample('M',  how={'A': 'mean', 'B': 'mean',  'D': 'ffill'})
  df4.head()
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>                      B          A        D
  C                                          
  A 2014-03-31 -0.4640906 -0.2435414  Pickles
    2014-04-30        NaN        NaN      NaN
    2014-05-31        NaN        NaN      NaN
    2014-06-30 -0.5626360  0.6679614  Pickles
    2014-07-31        NaN        NaN      NaN
  </code></pre>
  
  <p>When I resample df3 to a lower frequency I don't get any resampling at all:</p>
  
  <pre><code>df5 = df3.groupby(['C']).resample('A',  how={'A': np.mean, 'B': np.mean,  'D': 'ffill'})
  df5.head()
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>                      B          A        D
  C                                          
  A 2014-03-31        NaN        NaN  Pickles
    2014-06-30        NaN        NaN  Pickles
    2014-09-30        NaN        NaN  Pickles
    2014-12-31 -0.7429617 -0.1065645  Pickles
    2015-03-31        NaN        NaN  Pickles
  </code></pre>
  
  <p>I'm pretty sure that this has something to do with the mixed types because if I redo the annual down-sampling with just numerical columns everything works as expected:</p>
  
  <pre><code>df5b = df3[['A', 'B', 'C']].groupby(['C']).resample('A',  how={'A': np.mean, 'B': np.mean})
  df5b.head()
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>                     B          A
    C                                 
    A 2014-12-31 -0.7429617 -0.1065645
      2015-12-31 -0.6245030 -0.3101057
    B 2014-12-31  0.4213621 -0.0708263
      2015-12-31 -0.0607028  0.0110456
  </code></pre>
  
  <p>But even when I switch to numerical types the resampling to higher frequency still doesn't work as I expected:</p>
  
  <pre><code>df4b = df3[['A', 'B', 'C']].groupby(['C']).resample('M',  how={'A': 'mean', 'B': 'mean'})
  df4b.head()
  </code></pre>
  
  <p>Results:</p>
  
  <pre><code>                      B          A
  C                                 
  A 2014-03-31 -0.4640906 -0.2435414
    2014-04-30        NaN        NaN
    2014-05-31        NaN        NaN
    2014-06-30 -0.5626360  0.6679614
    2014-07-31        NaN        NaN
  </code></pre>
  
  <p>Which leaves me with two questions:</p>
  
  <ol>
  <li>What is the proper way to resample a dataframe of mixed type?</li>
  <li>When resampling from a lower frequency to a higher frequency what is the proper way to do the resampling so that the new values are interpolated?</li>
  </ol>
  
  <p>Even if you can't provide a full answer to both parts a partial solution or an answer to either question is appreciated. </p>