title: Error: astype() got an unexpected keyword argument 'categories'
body: <pre><code> df = pd.DataFrame(['A+', 'A', 'A-', 'B+', 'B', 'B-', 'C+', 'C', 'C-', 'D+', 'D'],
                        index=['excellent', 'excellent', 'excellent', 'good', 'good', 'good', 'ok', 'ok', 'ok', 'poor', 'poor'])
      df.rename(columns={0: 'Grades'}, inplace=True)
      df
  </code></pre>
  
  <p>I am trying to create an ordered category from the above dataframe using the following code -</p>
  
  <pre><code>df = df['Grades'].astype('category',categories=['D', 'D+', 'C-', 'C', 'C+', 'B-', 'B', 'B+', 'A-', 'A', 'A+'],ordered=True)
  </code></pre>
  
  <p>However it gives the error : <strong>astype() got an unexpected keyword argument 'categories'</strong>.</p>