title: Why does `.keys()` return `Index` for a Pandas `DataFrame`?
body: <p>My ultimate objective is to get a specific value by group label after taking the mean of some groups. To do this I would like to grab a list of the column names so I can select the column with the group label I'm interested in. However, the behavior of the resulting <code>DataFrame</code> is not as expected:</p>
  
  <pre><code>import pandas as pd
  df = pd.DataFrame({'x': ['a','b','c','a','b','c'], 'y': [1, 2, 3, 4, 5, 6]})
  means = df.groupby('x').mean()
  </code></pre>
  
  <p><code>type(means)</code> gives <code>pandas.core.frame.DataFrame</code></p>
  
  <p><code>means.keys()</code> gives <code>Index(['y'], dtype='object')</code></p>
  
  <p>However, the documentation for the <code>keys</code> method says:</p>
  
  <blockquote>
    <p>Get the 'info axis' (see Indexing for more) </p>
    
    <p>This is index for Series, columns for DataFrame and major_axis for Panel.</p>
  </blockquote>
  
  <p>The result of <code>mean.keys()</code> appears to contradict this, as <code>mean</code> is a <code>DataFrame</code> but it is returning an <code>Index</code> as if it were a <code>Series</code>. Is this the intended behavior? If it really were a series I could look up the desired value very easily, but it still acts like a DataFrame in most ways.</p>
  
  <p>This is pandas 0.24.2 on Python 3.7.3</p>