DOC: Fix DataFrame.to_csv docstring and add an example. GH22459
- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Fix the DataFrame.to_csv docstring to match `scripts/validate_docstrings.py` as explained in #22459. I also added an example. Is the whatsnew entry needed for documentation too?

Travis fails due to a curl error. # [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22475?src=pr&el=h1) Report
> Merging [#22475](https://codecov.io/gh/pandas-dev/pandas/pull/22475?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/db970894860fdf0a05056e43fc557ac995a2c6a0?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #22475   +/-   ##
=======================================
  Coverage   92.04%   92.04%           
=======================================
  Files         169      169           
  Lines       50787    50787           
=======================================
  Hits        46745    46745           
  Misses       4042     4042
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.45% <ø> (ø)` | :arrow_up: |
| #single | `42.29% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22475?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/22475/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.44% <ø> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22475?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/22475?src=pr&el=footer). Last update [db97089...def8a14](https://codecov.io/gh/pandas-dev/pandas/pull/22475?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 circleci `py27_compat` fails after a `libgfortran` import. @Moisan do you mind updating you branch with master (i.e. `git fetch upstream && git merge upstream/master && git push`).

The fail in the build is unrelated to your changes, but doesn't seem it reruns when I trigger it from the web interface. @WillAyd please merge when you're happy with this Thanks @Moisan  BTW, sphinx requires a blank line *before* a `versionadded`/`versionchanged`/`deprecated` directive (unless it is the first thing in a parameter description), which was removed for some here. Did a quick fix: https://github.com/pandas-dev/pandas/pull/22816