read_html(): rewinding [wip]
State: closed

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


Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: IO HTML
description: read_html, to_html, Styler.apply, Styler.applymap

Comments:
tests!
~~Unfortunately, non-seekable io objects typically still have a stub `.seek()` implementation which raises `io.UnsupportedOperation`. I'll trap that instead.~~

Thankfully, Python has a built-in solution for this, [`io.IOBase.seekable()`](https://docs.python.org/3.6/library/io.html#io.IOBase.seekable)!
Hello @liamim! Thanks for updating the PR.





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

##### Comment last updated on October 29, 2017 at 01:08 Hours UTC
How should I test rewinding on file objects? Just add a malformed HTML file to `pandas/tests/io/data`?
there are several examples in the issue
you can also create a class that is has a read and seek method that wraps a url
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=h1) Report
> Merging [#18017](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/5959ee3e133723136d4862864988a63ef3cc2a2f?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `75%`.

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

```diff
@@            Coverage Diff             @@
##           master   #18017      +/-   ##
==========================================
+ Coverage   91.23%   91.25%   +0.01%     
==========================================
  Files         163      163              
  Lines       50091    50095       +4     
==========================================
+ Hits        45703    45712       +9     
+ Misses       4388     4383       -5
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.05% <75%> (+0.02%)` | :arrow_up: |
| #single | `40.24% <0%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/html.py](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=tree#diff-cGFuZGFzL2lvL2h0bWwucHk=) | `85.66% <75%> (+0.49%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.75% <0%> (-0.1%)` | :arrow_down: |
| [pandas/io/pytables.py](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=tree#diff-cGFuZGFzL2lvL3B5dGFibGVzLnB5) | `92.84% <0%> (+0.04%)` | :arrow_up: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.2% <0%> (+1.81%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18017?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/18017?src=pr&el=footer). Last update [5959ee3...a85cd42](https://codecov.io/gh/pandas-dev/pandas/pull/18017?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/18017?src=pr&el=h1) Report
> Merging [#18017](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/5959ee3e133723136d4862864988a63ef3cc2a2f?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #18017      +/-   ##
==========================================
+ Coverage   91.24%   91.25%   +0.01%     
==========================================
  Files         163      163              
  Lines       50091    50095       +4     
==========================================
+ Hits        45704    45713       +9     
+ Misses       4387     4382       -5
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.06% <100%> (+0.02%)` | :arrow_up: |
| #single | `40.24% <0%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/html.py](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=tree#diff-cGFuZGFzL2lvL2h0bWwucHk=) | `85.98% <100%> (+0.8%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.75% <0%> (-0.1%)` | :arrow_down: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/18017?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.2% <0%> (+1.81%)` | :arrow_up: |

------

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

thanks @liamim nice PR!