DOC: correct docstring examples (#3439)
State: closed

xref #3439

Labels:
name: Docs

Comments:
What does it mean when the continuous-integration/travis-ci/py failed?
In this case it is due to some linting errors (some style issues, based on PEP8 and flake are checked in the third build on travis, which is the one that is failing. If you go to travis and click on the failing build, and scroll down, you can see why). 
The output from travis:

```
$ ci/lint.sh

inside ci/lint.sh
Linting  *.py
pandas/core/reshape/reshape.py:992:80: E501 line too long (84 > 79 characters)
pandas/core/reshape/reshape.py:993:80: E501 line too long (81 > 79 characters)
pandas/core/reshape/reshape.py:994:80: E501 line too long (81 > 79 characters)
pandas/core/reshape/reshape.py:995:80: E501 line too long (81 > 79 characters)
pandas/core/reshape/reshape.py:1000:1: W293 blank line contains whitespace
pandas/core/reshape/reshape.py:1001:80: E501 line too long (88 > 79 characters)
pandas/core/reshape/reshape.py:1015:80: E501 line too long (117 > 79 characters)
pandas/core/reshape/reshape.py:1133:71: W291 trailing whitespace
Linting *.py DONE
```
See http://pandas.pydata.org/pandas-docs/stable/contributing.html#python-pep8 (I would recommend you to set up the editor you are using to check for this as well, that should be possible with most code editors)
I don't see any way (may not have search correct) for Notepad++ and PEP8
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=h1) Report
> Merging [#16432](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/b0d9ee0b4c0911e089d4dd7c6a676557909fb7da?src=pr&el=desc) will **decrease** coverage by `0.37%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #16432      +/-   ##
==========================================
- Coverage   90.79%   90.42%   -0.38%     
==========================================
  Files         161      161              
  Lines       51063    51025      -38     
==========================================
- Hits        46363    46139     -224     
- Misses       4700     4886     +186
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.26% <ø> (-0.38%)` | :arrow_down: |
| #single | `40.17% <ø> (+0.01%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/reshape/pivot.py](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9waXZvdC5weQ==) | `95.08% <ø> (ø)` | :arrow_up: |
| [pandas/core/reshape/reshape.py](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9yZXNoYXBlLnB5) | `99.28% <ø> (-0.01%)` | :arrow_down: |
| [pandas/core/reshape/concat.py](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9jb25jYXQucHk=) | `97.62% <ø> (ø)` | :arrow_up: |
| [pandas/core/reshape/tile.py](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS90aWxlLnB5) | `90.25% <ø> (ø)` | :arrow_up: |
| [pandas/io/formats/excel.py](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvZXhjZWwucHk=) | `74.24% <0%> (-22.41%)` | :arrow_down: |
| [pandas/io/excel.py](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree#diff-cGFuZGFzL2lvL2V4Y2VsLnB5) | `62.31% <0%> (-18.33%)` | :arrow_down: |
| [pandas/conftest.py](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree#diff-cGFuZGFzL2NvbmZ0ZXN0LnB5) | `95.83% <0%> (-0.6%)` | :arrow_down: |
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.32% <0%> (-0.35%)` | :arrow_down: |
| [pandas/core/window.py](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvd2luZG93LnB5) | `96.24% <0%> (-0.24%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `80.79% <0%> (-0.2%)` | :arrow_down: |
| ... and [11 more](https://codecov.io/gh/pandas-dev/pandas/pull/16432?src=pr&el=tree-more) | |

------

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

Once confirmed, pivot completed.
Just pushed some fixes for the pep8 failures, and enabled the doctests on the doc build. We'll check the output of https://travis-ci.org/pandas-dev/pandas/jobs/236410485 when it finishes.
@ProsperousHeart Thanks a lot for working on this! 
Merging this now (follow-up PRs to do further improvements are always welcome!)

The appveyor failure is the matplotlib one, so ignoring that one.

There is one failing doctest, but that seems a python version issue (get different results when testing that locally as well on different python version). Will do another PR to check if changing doc build to py 3.6 solves things.