sas7bdat: Check if the SAS file has zero variables
State: closed

If the given SAS file has 0 rows, throw an error for the EmptyData file.
When reading, check that the column information is available. If not,
throw an error.

- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Bug
name: Error Reporting
description: Incorrect or improved errors from pandas
name: IO SAS
description: SAS: read_sas

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





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

##### Comment last updated on November 10, 2017 at 03:11 Hours UTC
@jreback - Thanks for the comments. Updated.
> can you add a whatsnew note for 0.22 (can be in bug fixes). what did this do before with an empty file?

Can you help me with which file I should be updating for this ?
doc/source/whatsnew/v0.22.0.txt
@jreback Thanks. its done
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=h1) Report
> Merging [#18184](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/ca737aca8b73b10b617f7fcc7da35545f9ec0a89?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/18184/graphs/tree.svg?width=650&height=150&src=pr&token=eZ4WkYLtcO)](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #18184      +/-   ##
==========================================
+ Coverage    91.4%   91.41%   +0.01%     
==========================================
  Files         163      163              
  Lines       50064    50067       +3     
==========================================
+ Hits        45759    45767       +8     
+ Misses       4305     4300       -5
```

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

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/sas/sas7bdat.py](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXM3YmRhdC5weQ==) | `91.05% <100%> (+0.28%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.8% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.48% <0%> (+0.09%)` | :arrow_up: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/18184?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/18184?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/18184?src=pr&el=footer). Last update [ca737ac...90d100c](https://codecov.io/gh/pandas-dev/pandas/pull/18184?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/18184?src=pr&el=h1) Report
> Merging [#18184](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/ca737aca8b73b10b617f7fcc7da35545f9ec0a89?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/18184/graphs/tree.svg?src=pr&token=eZ4WkYLtcO&width=650&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #18184      +/-   ##
==========================================
+ Coverage    91.4%   91.41%   +0.01%     
==========================================
  Files         163      163              
  Lines       50064    50067       +3     
==========================================
+ Hits        45759    45767       +8     
+ Misses       4305     4300       -5
```

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

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/sas/sas7bdat.py](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXM3YmRhdC5weQ==) | `91.05% <100%> (+0.28%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.8% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.48% <0%> (+0.09%)` | :arrow_up: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/18184?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/18184?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/18184?src=pr&el=footer). Last update [ca737ac...90d100c](https://codecov.io/gh/pandas-dev/pandas/pull/18184?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks @AbdealiJK