BUG: Fix Empty DataFrame.style.render raises IndexError
State: closed

Fix attempt for Issue #15953

Handles DataFrames and Series with no rows or columns
using `pd.DataFrame().empty` or `pd.Series().empty`

```python
In [1]: import pandas as pd

In [2]: pd.DataFrame().style.render()
Out[2]: '\n        <style  type="text/css" >\n        \n        \n        </style>\n\n        <table id="T_de3b3e8c_1e30_11e7_9abb_a8667f1b25b4" None>\n        \n\n        <thead>\n            \n        </thead>\n        <tbody>\n            \n        </tbody>\n        </table>\n        '
```

 - [ ] closes #15953 
 - [ ] tests added / passed
 - [ ] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff``
 - [ ] whatsnew entry


Labels:
name: Bug
name: IO HTML
description: read_html, to_html, Styler.apply, Styler.applymap

Comments:
I think our desired output is the same as the notebook 

![screen shot 2017-04-10 at 4 25 09 pm](https://cloud.githubusercontent.com/assets/1312546/24883449/91580a3c-1e0a-11e7-91ba-b525dd0a0a67.png)

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15971?src=pr&el=h1) Report
> Merging [#15971](https://codecov.io/gh/pandas-dev/pandas/pull/15971?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/838e09ccef896a1265b5447fb14f0969f7cd86d5?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/15971/graphs/tree.svg?width=650&src=pr&token=eZ4WkYLtcO&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/15971?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #15971      +/-   ##
==========================================
+ Coverage      91%   91.01%   +<.01%     
==========================================
  Files         145      145              
  Lines       49581    49581              
==========================================
+ Hits        45122    45124       +2     
+ Misses       4459     4457       -2
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.77% <100%> (ø)` | :arrow_up: |
| #single | `40.57% <0%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15971?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/formats/style.py](https://codecov.io/gh/pandas-dev/pandas/pull/15971?src=pr&el=tree#diff-cGFuZGFzL2Zvcm1hdHMvc3R5bGUucHk=) | `96.17% <100%> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/15971?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `81.13% <0%> (+0.18%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15971?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/15971?src=pr&el=footer). Last update [838e09c...5f88c22](https://codecov.io/gh/pandas-dev/pandas/pull/15971?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
pls rebase / update according to the comments. Needs a tests.
whatsnew notes should go in `whatsnew/0.20.2.txt` now.
Looks like https://github.com/pandas-dev/pandas/pull/16441 fixed this in the meantime. Thanks anyways @sandipchatterjee, sorry about the duplicated effort.