Fix #27451 (doc + validation)
- [X ] closes #27451 
- [ X] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Hello @ddebernardy! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:



There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2019-07-19 07:06:38 UTC Can you add a test to ensure that this raises? @jschendel @WillAyd 

> Can you add a test to ensure that this raises?

There is one already.

https://github.com/pandas-dev/pandas/blob/master/pandas/tests/generic/test_generic.py#L361

I imagine the negative `float` is currently getting caught as a negative `n` somewhere downstream in the code. Looks like doctest is failing:

https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=14665&view=logs&jobId=435ca956-9126-505f-566f-fff31072e2ba

Can you merge master and take a look? @ddebernardy can you rebase Thanks for the PR! Looks like this has gone stale though so closing. ping if you'd like to pick it back up