ENH: to_list as alias for tolist
State: closed

- [x] closes #8826
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: API Design

Comments:
Hello @ScientiaEtVeritas! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/core/arrays/categorical.py`](https://github.com/ScientiaEtVeritas/pandas/blob/70c3ddac45d71f2de158d6e711e53dc86450ab78/pandas/core/arrays/categorical.py) !

 - There are no PEP8 issues in the file [`pandas/core/base.py`](https://github.com/ScientiaEtVeritas/pandas/blob/70c3ddac45d71f2de158d6e711e53dc86450ab78/pandas/core/base.py) !


# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23398?src=pr&el=h1) Report
> Merging [#23398](https://codecov.io/gh/pandas-dev/pandas/pull/23398?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/53899874f8c33bf00b68d270beee2640078f3cd6?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #23398      +/-   ##
==========================================
+ Coverage   92.21%   92.21%   +<.01%     
==========================================
  Files         162      162              
  Lines       51761    51771      +10     
==========================================
+ Hits        47731    47743      +12     
+ Misses       4030     4028       -2
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.62% <100%> (ø)` | :arrow_up: |
| #single | `43.01% <100%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/23398?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/23398/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `93.7% <ø> (ø)` | :arrow_up: |
| [pandas/core/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/23398/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYmFzZS5weQ==) | `97.64% <100%> (ø)` | :arrow_up: |
| [pandas/core/arrays/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/23398/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2NhdGVnb3JpY2FsLnB5) | `95.31% <100%> (ø)` | :arrow_up: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/23398/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.27% <100%> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/23398/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `87.41% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/23398/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.65% <0%> (ø)` | :arrow_up: |
| [pandas/core/groupby/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/23398/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9nZW5lcmljLnB5) | `87.12% <0%> (+0.04%)` | :arrow_up: |
| [pandas/core/groupby/groupby.py](https://codecov.io/gh/pandas-dev/pandas/pull/23398/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9ncm91cGJ5LnB5) | `96.67% <0%> (+0.16%)` | :arrow_up: |
| [pandas/io/json/json.py](https://codecov.io/gh/pandas-dev/pandas/pull/23398/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2pzb24vanNvbi5weQ==) | `93.09% <0%> (+0.47%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23398?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/23398?src=pr&el=footer). Last update [5389987...c57e8eb](https://codecov.io/gh/pandas-dev/pandas/pull/23398?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

I've added a commit which reflects the points you mentioned.
lgtm. @TomAugspurger @jorisvandenbossche if any comments.
We use `.tolist()` in the docs in a few places. If we're recommend to_list
then we need to update those.

Personally, I don't care which we recommend. NumPy users will be familiar
with tolist. But if we're remvoing
tolist from the API docs, then we should update all the docs.

On Wed, Oct 31, 2018 at 6:06 PM Jeff Reback <notifications@github.com>
wrote:

> lgtm. @TomAugspurger <https://github.com/TomAugspurger>
> @jorisvandenbossche <https://github.com/jorisvandenbossche> if any
> comments.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/23398#issuecomment-434897541>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABQHIuOCn_iZiOrp3dJCfM8T3lK0PmzJks5uqkkmgaJpZM4X99sH>
> .
>

can you merge master and update the docs as indicated.
I merged master – and updated all places where ``tolist`` is used in the docs (at least I think so).
thanks @ScientiaEtVeritas