is this a series or dataframe?
<p>I am quite new to Python, and have some basic questions which I could not find answer till now.</p>

<p>suppose I have the following dataframe named phone.</p>

<pre><code>     current_cellphone  | months of usage |  previous_cellphone
0   |     Motorola       |     11          |    Motorola
1   |     Huawei         |     21          |    Nokia
2   |     Motorola       |     13          |    Motorola
3   |     Nokia          |     2           |    iphone
4   |     Huawei         |     20          |    Huawei
5   |     Motorola       |     15          |    Motorola
6   |     Sony           |     9           |    HTC
</code></pre>

<p>My initiative is to group by current_cellphone, select those which are counted more than once (Motorola and Huawei).</p>

<pre><code>phone['current_cellphone'].value_counts
</code></pre>

<p>The result is </p>

<pre><code>Motorola      |      3
Huawei        |      2
Nokia         |      1
</code></pre>

<p><strong>My 1st question is :</strong> does the code above yield a dataframe or series?</p>

<p><strong>My 2nd question is</strong>: how do I retrieve the first and second column of the above table? </p>

<p>Thank you very much for your helps.. </p>

<pre><code>type(phone['current_cellphone'].value_counts())

pandas.core.series.Series
</code></pre>

<hr>

<pre><code>phone['current_cellphone'].value_counts().to_frame()
</code></pre>

<p><a href="http://i.stack.imgur.com/a2mWg.png" rel="nofollow"><img src="http://i.stack.imgur.com/a2mWg.png" alt="enter image description here"></a></p>

<hr>

<p>Or:</p>

<pre><code>phone['current_cellphone'].value_counts().reset_index()
</code></pre>

<p><a href="http://i.stack.imgur.com/EUht7.png" rel="nofollow"><img src="http://i.stack.imgur.com/EUht7.png" alt="enter image description here"></a></p>

<pre><code>type(phone['current_cellphone'].value_counts().to_frame())

pandas.core.frame.DataFrame
</code></pre>

python pandas numpy