Add nrows parameter to pandas.read_excel()
State: closed

- [x] closes #16645 
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

I was working on this a few months back, but got busy. Apologies. I'm free until January so thought I'd pick this back up.

### Changes
* Added code for `nrows` parameter (with tests)
* Changed order of parameters to match `pandas.read_csv()` signature (across entire `pandas/io/excel.py` file)
* Increased readability by having one parameter per line
* Updated docstring to match new order (+ new entry for `nrows` param)

I think that covered all the outstanding issues from the [previous (closed) PR](https://github.com/pandas-dev/pandas/pull/16672). Please let me know if you need anything changed or modified.

Labels:
name: IO Excel
description: read_excel, to_excel
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
LGTM; Travis build issues appear to be related to quote issues and not test failures.
Hi @jreback @gfyoung 
Could you please take a look at this when you have some time?

Thanks!
@alysivji : Thanks for the ping.  A couple of points:

1) We do need the Travis builds to pass before we can merge this.  I'll double-check to see if you need to do anything to fix that.

2) Your PR is for adding `nrows` to `read_excel`, but you also changed up the signature.  IMO that's a little too much API changing in one PR for us to review.  Let's break up this PR into two by separating out your `read_excel` signature changes into a separate PR.

I'm totally onboard for adding `nrows` but need to review your signature changes separately.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18507?src=pr&el=h1) Report
> Merging [#18507](https://codecov.io/gh/pandas-dev/pandas/pull/18507?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/27a64b2bb9d631ef584a941a3a3f66aebc2477f5?src=pr&el=desc) will **decrease** coverage by `0.04%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #18507      +/-   ##
==========================================
- Coverage    91.6%   91.56%   -0.05%     
==========================================
  Files         153      153              
  Lines       51272    51273       +1     
==========================================
- Hits        46969    46947      -22     
- Misses       4303     4326      +23
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.42% <100%> (-0.03%)` | :arrow_down: |
| #single | `40.68% <62.5%> (-0.11%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18507?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/excel.py](https://codecov.io/gh/pandas-dev/pandas/pull/18507/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2V4Y2VsLnB5) | `90.13% <100%> (ø)` | :arrow_up: |
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/18507/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.55% <100%> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18507/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/18507/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `64.78% <0%> (-1.74%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/18507/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `81.82% <0%> (-0.2%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18507/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.81% <0%> (-0.1%)` | :arrow_down: |

------

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

I am ok with the re-aranging of parameters in this PR. pls rebase.
@jreback How does this look? Any changes needed?
thanks!
Hi folks,

Reading the Whats New for Pandas 0.22.0 as well as checking the pandas.read_excel page I note that nrows param is not yet available for read_excel(..).  Is there any indication as to when as well as what version of Pandas it will be added?  Thanks in advance to the people involved in adding this functionality, keep up the great work!
@Sabr3tooth Pandas 0.22 had a [single API breaking change](https://pandas.pydata.org/pandas-docs/stable/whatsnew.html#v0-22-0-december-29-2017).

This enhancement will be in 0.23 based on the [whatsnew in master](https://github.com/pandas-dev/pandas/blob/master/doc/source/whatsnew/v0.23.0.txt)
Thanks, looking forward to seeing it in Pandas!