ENH: inconsistent naming convention for read_excel column selection (#4988)
State: closed

- update API to use ‘usecols’ instead of ‘parse_cols’.  still functionally the same as ‘parse_col’,
- added test cases for ‘usecols’, added assert_produces_warning(FutureWarning) to other test
cases that use ‘parse_cols’.
- refactor column use column parsing to only occur once per sheet.
- updated whats new with deprecated parse_col argument.

 - [X] closes #4988 
 - [X] tests added / passed
 - [X] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff``
 - [X] whatsnew entry
 - [X] packers.* BENCHMARKS NOT SIGNIFICANTLY CHANGED.


Labels:
name: IO Excel
description: read_excel, to_excel
name: Deprecate
description: Functionality to remove in pandas

Comments:
FYI, just discussing a bug related to usecols #15316, might be easiest to work that change into your refactoring, or can be separate, cc @stanleyguan


# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@b0a51df`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `38.88%`.

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

```diff
@@            Coverage Diff            @@
##             master   #16488   +/-   ##
=========================================
  Coverage          ?    90.4%           
=========================================
  Files             ?      161           
  Lines             ?    51038           
  Branches          ?        0           
=========================================
  Hits              ?    46139           
  Misses            ?     4899           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.24% <38.88%> (?)` | |
| #single | `40.16% <11.11%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/excel.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2lvL2V4Y2VsLnB5) | `62.29% <38.88%> (ø)` | |

------

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

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=h1) Report
> Merging [#16488](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/b0d9ee0b4c0911e089d4dd7c6a676557909fb7da?src=pr&el=desc) will **decrease** coverage by `0.36%`.
> The diff coverage is `45.45%`.

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

```diff
@@            Coverage Diff             @@
##           master   #16488      +/-   ##
==========================================
- Coverage   90.79%   90.43%   -0.37%     
==========================================
  Files         161      161              
  Lines       51063    51046      -17     
==========================================
- Hits        46363    46162     -201     
- Misses       4700     4884     +184
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.27% <45.45%> (-0.37%)` | :arrow_down: |
| #single | `40.16% <18.18%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/excel.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2lvL2V4Y2VsLnB5) | `62.37% <45.45%> (-18.27%)` | :arrow_down: |
| [pandas/io/formats/excel.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvZXhjZWwucHk=) | `74.24% <0%> (-22.41%)` | :arrow_down: |
| [pandas/conftest.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?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/16488?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.33% <0%> (-0.33%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `80.79% <0%> (-0.2%)` | :arrow_down: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.71% <0%> (-0.19%)` | :arrow_down: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `92.16% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/resample.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzYW1wbGUucHk=) | `96.08% <0%> (-0.02%)` | :arrow_down: |
| [pandas/core/reshape/pivot.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9waXZvdC5weQ==) | `95.08% <0%> (ø)` | :arrow_up: |
| ... and [4 more](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree-more) | |

------

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

@abarber4gh can you rebase, now that the excel tests are running?
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=h1) Report
> Merging [#16488](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/b0d9ee0b4c0911e089d4dd7c6a676557909fb7da?src=pr&el=desc) will **increase** coverage by `0.14%`.
> The diff coverage is `98.4%`.

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

```diff
@@            Coverage Diff             @@
##           master   #16488      +/-   ##
==========================================
+ Coverage   90.79%   90.93%   +0.14%     
==========================================
  Files         161      161              
  Lines       51063    49267    -1796     
==========================================
- Hits        46363    44802    -1561     
+ Misses       4700     4465     -235
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.69% <96%> (+0.06%)` | :arrow_up: |
| #single | `40.22% <27.2%> (+0.07%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/reshape/pivot.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9waXZvdC5weQ==) | `95.08% <ø> (ø)` | :arrow_up: |
| [pandas/core/reshape/reshape.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9yZXNoYXBlLnB5) | `99.28% <ø> (ø)` | :arrow_up: |
| [pandas/core/reshape/concat.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9jb25jYXQucHk=) | `97.62% <ø> (ø)` | :arrow_up: |
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `93.43% <ø> (-0.01%)` | :arrow_down: |
| [pandas/core/indexes/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9wZXJpb2QucHk=) | `92.74% <ø> (ø)` | :arrow_up: |
| [pandas/tseries/offsets.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvb2Zmc2V0cy5weQ==) | `97.12% <ø> (-0.01%)` | :arrow_down: |
| [pandas/io/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2lvL2NvbW1vbi5weQ==) | `69.91% <ø> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `100% <ø> (+19.01%)` | :arrow_up: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `86.89% <0%> (ø)` | :arrow_up: |
| [pandas/compat/pickle\_compat.py](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree#diff-cGFuZGFzL2NvbXBhdC9waWNrbGVfY29tcGF0LnB5) | `69.51% <100%> (ø)` | :arrow_up: |
| ... and [34 more](https://codecov.io/gh/pandas-dev/pandas/pull/16488?src=pr&el=tree-more) | |

------

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

can you rebase / update according to comments
closing as stale. pls ping to reopen if you want to continue.