Backport PR #25266 on branch 0.24.x (BUG: Fix regression on DataFrame.replace for regex)
State: closed

Backport PR #25266: BUG: Fix regression on DataFrame.replace for regex

Labels:
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25477?src=pr&el=h1) Report
> Merging [#25477](https://codecov.io/gh/pandas-dev/pandas/pull/25477?src=pr&el=desc) into [0.24.x](https://codecov.io/gh/pandas-dev/pandas/commit/90b2daaf0327de672067f20ea84ad5ae16be3476?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           0.24.x   #25477      +/-   ##
==========================================
+ Coverage   92.39%   92.39%   +<.01%     
==========================================
  Files         166      166              
  Lines       52419    52419              
==========================================
+ Hits        48434    48435       +1     
+ Misses       3985     3984       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.82% <100%> (ø)` | :arrow_up: |
| #single | `42.91% <25%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25477?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals/managers.py](https://codecov.io/gh/pandas-dev/pandas/pull/25477/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL21hbmFnZXJzLnB5) | `96.06% <100%> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25477/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `88.13% <0%> (+0.09%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25477?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/25477?src=pr&el=footer). Last update [90b2daa...e5d0405](https://codecov.io/gh/pandas-dev/pandas/pull/25477?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/25477?src=pr&el=h1) Report
> Merging [#25477](https://codecov.io/gh/pandas-dev/pandas/pull/25477?src=pr&el=desc) into [0.24.x](https://codecov.io/gh/pandas-dev/pandas/commit/90b2daaf0327de672067f20ea84ad5ae16be3476?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           0.24.x   #25477      +/-   ##
==========================================
+ Coverage   92.39%   92.39%   +<.01%     
==========================================
  Files         166      166              
  Lines       52419    52419              
==========================================
+ Hits        48434    48435       +1     
+ Misses       3985     3984       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.82% <100%> (ø)` | :arrow_up: |
| #single | `42.91% <25%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25477?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals/managers.py](https://codecov.io/gh/pandas-dev/pandas/pull/25477/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL21hbmFnZXJzLnB5) | `96.06% <100%> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25477/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `88.13% <0%> (+0.09%)` | :arrow_up: |

------

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