title: Keep columns after a groupby in an empty dataframe
body: <p>The dataframe is an empty df after query.when groupby,raise runtime waring,then get another empty dataframe with no columns.How to keep the columns?</p>
  
  <pre><code>df = pd.DataFrame(columns=["PlatformCategory","Platform","ResClassName","Amount"])
  print df
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>Empty DataFrame
  Columns: [PlatformCategory, Platform, ResClassName, Amount]
  Index: []
  </code></pre>
  
  <p>then groupby:</p>
  
  <pre><code>df = df.groupby(["PlatformCategory","Platform","ResClassName"]).sum()
  df = df.reset_index(drop=False,inplace=True)
  print df
  </code></pre>
  
  <p>result:
  sometimes is None
  sometime is empty dataframe</p>
  
  <pre><code>Empty DataFrame
  Columns: []
  Index: []
  </code></pre>
  
  <p>why empty dataframe has no columns.</p>
  
  <p>runtimewaring:</p>
  
  <pre><code>/data/pyrun/lib/python2.7/site-packages/pandas/core/groupby.py:3672: RuntimeWarning: divide by zero encountered in log
  </code></pre>
  
  <p>if alpha + beta * ngroups &lt; count * np.log(count):</p>
  
  <pre><code>/data/pyrun/lib/python2.7/site-packages/pandas/core/groupby.py:3672: RuntimeWarning: invalid value encountered in double_scalars
    if alpha + beta * ngroups &lt; count * np.log(count):
  </code></pre>