DEPR: allow options for using bottleneck/numexpr
State: closed

deprecate pd.computation.expressions.set_use_numexpr()

supersedes #16140 


Labels:
name: API Design
name: Deprecate
description: Functionality to remove in pandas

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=h1) Report
> Merging [#16157](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8879e8495b1af038c054787ad3597a27c1c07903?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `76.38%`.

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

```diff
@@            Coverage Diff             @@
##           master   #16157      +/-   ##
==========================================
+ Coverage   90.85%   90.87%   +0.01%     
==========================================
  Files         159      162       +3     
  Lines       50783    50816      +33     
==========================================
+ Hits        46141    46178      +37     
+ Misses       4642     4638       -4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.65% <75%> (+0.01%)` | :arrow_up: |
| #single | `40.33% <61.11%> (+0.01%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/formats/format.py](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvZm9ybWF0LnB5) | `95.66% <ø> (+0.61%)` | :arrow_up: |
| [pandas/computation/expressions.py](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree#diff-cGFuZGFzL2NvbXB1dGF0aW9uL2V4cHJlc3Npb25zLnB5) | `0% <0%> (ø)` | |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.59% <100%> (ø)` | :arrow_up: |
| [pandas/types/concat.py](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree#diff-cGFuZGFzL3R5cGVzL2NvbmNhdC5weQ==) | `100% <100%> (ø)` | |
| [pandas/core/nanops.py](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvbmFub3BzLnB5) | `98.2% <100%> (+0.02%)` | :arrow_up: |
| [pandas/core/computation/expressions.py](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tcHV0YXRpb24vZXhwcmVzc2lvbnMucHk=) | `92.68% <100%> (+0.05%)` | :arrow_up: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.2% <100%> (ø)` | :arrow_up: |
| [pandas/io/formats/console.py](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvY29uc29sZS5weQ==) | `69.69% <69.69%> (ø)` | |
| [pandas/core/config\_init.py](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29uZmlnX2luaXQucHk=) | `94.28% <83.33%> (-1.07%)` | :arrow_down: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `90.68% <0%> (-0.35%)` | :arrow_down: |
| ... and [4 more](https://codecov.io/gh/pandas-dev/pandas/pull/16157?src=pr&el=tree-more) | |

------

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

cc @jorisvandenbossche 
cc @dhirschfeld 
cc @shoyer 
LGTM
- updated for comments
- added deprecation warning for ``union_categoricals``
- docs & tests for new ``compute.use*`` options