title: as.type('category') not yielding the desired datatype change from 'float64'
body: <p>I'm trying to convert a particular column of a dataframe <code>df</code> to a categorical datatype! or what R Programming refers to as a <code>factor</code>.</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  df = pd.DataFrame(data=np.array([[1,1,2,2,3,3]]))
  df = df.T
  df[0].describe()
  </code></pre>
  
  <p>yields</p>
  
  <pre><code>count    6.000000
  mean     2.000000
  std      0.894427
  min      1.000000
  25%      1.250000
  50%      2.000000
  75%      2.750000
  max      3.000000
  Name: 0, dtype: float64
  </code></pre>
  
  <p>After I convert to 'category'</p>
  
  <pre><code>df[0] = df[0].astype('category')
  df[0].describe()
  </code></pre>
  
  <p>yields</p>
  
  <pre><code>count     6
  unique    3
  top       3
  freq      2
  Name: 0, dtype: int64
  </code></pre>
  
  <p><strong>Expected Output:</strong> After I convert the data type of a column to a category by using the right code (which I'm trying to figure out), I want <code>df[0].describe()</code> to display something like</p>
  
  <pre><code>dtype: category
  Categories (3, object): [1, 2, 3]
  </code></pre>
  
  <p>I think I kinda know where I'm going wrong. I feel like I need to explicitly mention the different categories or the different levels as I convert to categorical data type. Would love it if you could point me in the right direction doing this.</p>
  
  <p>Can every column having an <code>object</code> datatype be considered a <code>category</code> datatype? It would be helpful if you can highlight some major differences between the 'object' datatype and 'category'.</p>
  
  <p>Also, while implementing one-hot-encoding for Machine Learning, I understand that, it is used to convert categorical features to numerical features so you can plug them into sci-kit learn. So (in more formal terms) does this mean, one-hot-encoding will help convert a datatype of either <code>object</code> or <code>category</code> to <code>int64</code> datatype?</p>
  
  <p><strong>QUESTION RESOLVED from comments</strong>: There is a difference between typing df[0] and df[0].describe(), simply printing <code>df[0]</code> displayed the datatype as <code>category</code>, while, <code>df[0].describe()</code> shows it as int64.</p>