DOC: Make highlight functions match documentation
State: closed

Fixes mismatch between function and docs defined in #16998 




Labels:
name: Docs
name: Output-Formatting
description: __repr__ of pandas objects, to_string

Comments:
We want to adjust the docs to match the function. This change as it stands now *should* break some tests (if not then we don't have good enough test coverage).
Ah, I see. I wasn't sure which was the intended behaviour, which is why I didn't make the change myself to start with, but when prompted I went for what I considered the *expected* behaviour.
It's not too often that I am happy that tests fail :smile: 

This indicates we have coverage for this, which is good!

@parchd-1 : if you could just update the documentation (and revert your code change), everything will be green, and this PR will be on its way to being merged.
Sure, I'll do that. Before I do, though. I also noticed that _highlight_handler defaults to axis=None. Is it intentional that this has a different default to highlight_min and highlight_max? This was another part of why I originally changed the code to match the docs, rather than the other way round.
> Is it intentional that this has a different default to highlight_min and highlight_max?

"Intentional" is not necessarily the same as "logical" :smile:  I agree it is a little inconsistent, but maybe @TomAugspurger can say more.

In any case, the best thing to do here is to make the doc change, and you'll be set!
Ok, done.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=h1) Report
> Merging [#16999](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/0bd871fb9634e8b73efcc1aeabb93961fbc43d53?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #16999      +/-   ##
==========================================
- Coverage   90.99%   90.97%   -0.02%     
==========================================
  Files         161      161              
  Lines       49290    49291       +1     
==========================================
- Hits        44851    44843       -8     
- Misses       4439     4448       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.74% <ø> (ø)` | :arrow_up: |
| #single | `40.18% <ø> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/formats/style.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvc3R5bGUucHk=) | `100% <ø> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/config\_init.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29uZmlnX2luaXQucHk=) | `95.86% <0%> (-0.14%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.76% <0%> (-0.1%)` | :arrow_down: |
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.43% <0%> (ø)` | :arrow_up: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.91% <0%> (+0.01%)` | :arrow_up: |
| [pandas/core/sparse/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2ZyYW1lLnB5) | `94.24% <0%> (+0.02%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16999?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/16999?src=pr&el=footer). Last update [0bd871f...56f4630](https://codecov.io/gh/pandas-dev/pandas/pull/16999?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/16999?src=pr&el=h1) Report
> Merging [#16999](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/0bd871fb9634e8b73efcc1aeabb93961fbc43d53?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #16999      +/-   ##
==========================================
- Coverage   90.99%   90.97%   -0.02%     
==========================================
  Files         161      161              
  Lines       49290    49291       +1     
==========================================
- Hits        44851    44843       -8     
- Misses       4439     4448       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.74% <ø> (ø)` | :arrow_up: |
| #single | `40.18% <ø> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/formats/style.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvc3R5bGUucHk=) | `100% <ø> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/config\_init.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29uZmlnX2luaXQucHk=) | `95.86% <0%> (-0.14%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.76% <0%> (-0.1%)` | :arrow_down: |
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.43% <0%> (ø)` | :arrow_up: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.91% <0%> (+0.01%)` | :arrow_up: |
| [pandas/core/sparse/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16999?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2ZyYW1lLnB5) | `94.24% <0%> (+0.02%)` | :arrow_up: |

------

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

Thanks @parchd-1 !