Can't be astype a dataframe with CategoricalDtype
```
import pandas as pd
from pandas.api.types import CategoricalDtype

df = pd.DataFrame({'A': list('abca'), 'B': list('bccd')})
cat_type = CategoricalDtype(categories=list('abcd'), ordered=True)

df_cat = df.astype(cat_type)
```
#### Output of last step: 
```ValueError: Buffer has wrong number of dimensions (expected 1, got 2)```

This code is from the [documentation](https://pandas.pydata.org/pandas-docs/stable/categorical.html#controlling-behavior), but it does produces an error. When you try to change columns in a DataFrame to categorical it gives a ValueError. If you use a Series instead it works, but then you can't use multiple columns.

I'm new to reporting bugs, so if there is anything you'd recommend I do differently next time please let me know. thanks!

#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.6.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-42-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.22.0
pytest: 4.0.1
pip: 18.1
setuptools: 40.6.2
Cython: 0.29
numpy: 1.14.0
scipy: 1.0.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: 1.8.2
patsy: 0.5.0
dateutil: 2.7.5
pytz: 2018.7
blosc: None
bottleneck: 1.2.1
tables: 3.4.2
numexpr: 2.6.4
feather: None
matplotlib: 2.1.2
openpyxl: 2.5.11
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.1.2
lxml: 4.2.5
bs4: 4.6.3
html5lib: 1.0.1
sqlalchemy: 1.2.14
pymysql: 0.9.2
psycopg2: 2.7.5 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
</details>
