ENH: Add support for tablewise application of style.background_gradient with axis=None
State: closed


- [x] closes #15204
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


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

Comments:
Hello @soxofaan! Thanks for updating the PR.





Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on July 11, 2018 at 15:48 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21259?src=pr&el=h1) Report
> Merging [#21259](https://codecov.io/gh/pandas-dev/pandas/pull/21259?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/5d0daa0522730a6f999ceaf328f63f03dd62d0b4?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/21259/graphs/tree.svg?src=pr&token=eZ4WkYLtcO&height=150&width=650)](https://codecov.io/gh/pandas-dev/pandas/pull/21259?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #21259      +/-   ##
==========================================
+ Coverage   91.92%   91.92%   +<.01%     
==========================================
  Files         160      160              
  Lines       49906    49910       +4     
==========================================
+ Hits        45875    45879       +4     
  Misses       4031     4031
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.3% <100%> (ø)` | :arrow_up: |
| #single | `42.1% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21259?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/formats/style.py](https://codecov.io/gh/pandas-dev/pandas/pull/21259/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvc3R5bGUucHk=) | `96.16% <100%> (+0.03%)` | :arrow_up: |

------

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

@jschendel I updated the commit per your request

the failing tests/checks are not related to the change as far as I understand, is there something I should do about that?
you have linting issues: 

pandas/tests/io/formats/test_style.py:1066:1: E303 too many blank lines (3)

is it worth adding the OP example here?
@jreback   thanks, I didn't catch that linting issue warning. Lot of trees in the forest.

I think the OP example is good for interactive testing, but overkill for unit testing
(this PR will conflict with #21263 )
Had to rework this PR because #21263 has been merged

note that making `background_gradient` compatible with `axis=None` enabled to simplify the `relative_luminance` implementation of #21263
Illustration:
<img width="568" alt="screen shot 2018-06-07 at 21 17 59" src="https://user-images.githubusercontent.com/44946/41121334-5e87902e-6a98-11e8-84dd-fd54dd7a3d21.png">

`continuous-integration/travis-ci/pr` failure is due to 
```
CondaHTTPError: HTTP 502 BAD GATEWAY for url <https://conda.anaconda.org/conda-forge/linux-64/repodata.json>
```
😕 now `continuous-integration/travis-ci/pr ` failure is due to 
```
$ curl -sSf -o python-3.5.tar.bz2 ${archive_url}
curl: (35) Unknown SSL protocol error in connection to s3.amazonaws.com:443 
Unable to download 3.5 archive. The archive may not exist. Please consider a different version.
```


(rebased on latest master)
Thanks!