Backport PR #25088 on branch 0.24.x (Fixes Formatting Exception)
Backport PR #25088: Fixes Formatting Exception
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25343?src=pr&el=h1) Report
> Merging [#25343](https://codecov.io/gh/pandas-dev/pandas/pull/25343?src=pr&el=desc) into [0.24.x](https://codecov.io/gh/pandas-dev/pandas/commit/fcfd1d4cf7dc9cfde498e28206cc1773057832dd?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `77.77%`.

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

```diff
@@            Coverage Diff             @@
##           0.24.x   #25343      +/-   ##
==========================================
+ Coverage   92.38%   92.39%   +0.01%     
==========================================
  Files         166      166              
  Lines       52405    52408       +3     
==========================================
+ Hits        48412    48422      +10     
+ Misses       3993     3986       -7
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.82% <77.77%> (+0.01%)` | :arrow_up: |
| #single | `42.88% <11.11%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25343?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/formats/terminal.py](https://codecov.io/gh/pandas-dev/pandas/pull/25343/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvdGVybWluYWwucHk=) | `32.53% <77.77%> (+11.28%)` | :arrow_up: |

------

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

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

```diff
@@            Coverage Diff             @@
##           0.24.x   #25343      +/-   ##
==========================================
+ Coverage   92.38%   92.39%   +0.01%     
==========================================
  Files         166      166              
  Lines       52405    52408       +3     
==========================================
+ Hits        48412    48422      +10     
+ Misses       3993     3986       -7
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.82% <77.77%> (+0.01%)` | :arrow_up: |
| #single | `42.88% <11.11%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25343?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/formats/terminal.py](https://codecov.io/gh/pandas-dev/pandas/pull/25343/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvdGVybWluYWwucHk=) | `32.53% <77.77%> (+11.28%)` | :arrow_up: |

------

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