DOCS: Updated NDFrame.astype docs
State: closed

I've had a couple situations where I've doubted if it's ``ser.astype('category')`` or ``ser.astype('categorical')`` and the doc string doesn't say. 

I think a few examples could help here + illustrate usage of the method. Also some cleanup of the doc string.

Labels:
name: Docs

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=h1) Report
> Merging [#17203](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/3c833db29b6f5977c78d1ade791a09a5b29cedb8?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/17203/graphs/tree.svg?token=eZ4WkYLtcO&src=pr&width=650&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #17203      +/-   ##
==========================================
- Coverage   91.01%   90.99%   -0.02%     
==========================================
  Files         162      162              
  Lines       49502    49502              
==========================================
- Hits        45053    45044       -9     
- Misses       4449     4458       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.77% <ø> (ø)` | :arrow_up: |
| #single | `40.27% <ø> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `92.03% <ø> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.71% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=footer). Last update [3c833db...b366925](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=h1) Report
> Merging [#17203](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/7bef6d873b8af5ee0d35ba4b42c8a4775a6b3f24?src=pr&el=desc) will **increase** coverage by `0.04%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/17203/graphs/tree.svg?token=eZ4WkYLtcO&width=650&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #17203      +/-   ##
==========================================
+ Coverage      91%   91.05%   +0.04%     
==========================================
  Files         162      162              
  Lines       49508    49954     +446     
==========================================
+ Hits        45055    45485     +430     
- Misses       4453     4469      +16
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.85% <ø> (+0.08%)` | :arrow_up: |
| #single | `40.24% <ø> (-0.09%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `93.24% <ø> (+1.21%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.71% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=footer). Last update [7bef6d8...c90160a](https://codecov.io/gh/pandas-dev/pandas/pull/17203?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Hello @topper-123! Thanks for updating the PR.



Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on August 09, 2017 at 10:24 Hours UTC
@topper-123 Thanks a lot!