ENH: Improve explanation when erroring on dta files
State: closed

Improve the explanation when value labels are repeated in Stata dta files.
Add suggested methods to work around the issue using the low level
interface.

closes #25772

- [x] closes #25772
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: IO Stata
description: read_stata, to_stata

Comments:
Hello @bashtage! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:





There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2019-04-04 21:18:34 UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25968?src=pr&el=h1) Report
> Merging [#25968](https://codecov.io/gh/pandas-dev/pandas/pull/25968?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/4814a2875d078d6e9e9300bd1f77af15ef4f0f0a?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #25968      +/-   ##
==========================================
- Coverage   91.84%   91.83%   -0.01%     
==========================================
  Files         175      175              
  Lines       52550    52550              
==========================================
- Hits        48266    48261       -5     
- Misses       4284     4289       +5
```

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

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25968?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/25968/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `75% <0%> (-12.5%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/25968/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `96.79% <0%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25968/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.61% <0%> (-0.11%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25968?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/25968?src=pr&el=footer). Last update [4814a28...1e7243f](https://codecov.io/gh/pandas-dev/pandas/pull/25968?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/25968?src=pr&el=h1) Report
> Merging [#25968](https://codecov.io/gh/pandas-dev/pandas/pull/25968?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/013f4b4e41f309b839be1de39ab42815af447050?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/25968/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/25968?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #25968      +/-   ##
==========================================
- Coverage   91.86%   91.85%   -0.02%     
==========================================
  Files         175      175              
  Lines       52547    52543       -4     
==========================================
- Hits        48271    48262       -9     
- Misses       4276     4281       +5
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.4% <ø> (-0.01%)` | :arrow_down: |
| #single | `41.9% <ø> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25968?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/25968/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `75% <0%> (-12.5%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/25968/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `96.79% <0%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25968/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.62% <0%> (-0.11%)` | :arrow_down: |
| [pandas/io/formats/html.py](https://codecov.io/gh/pandas-dev/pandas/pull/25968/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvaHRtbC5weQ==) | `99.35% <0%> (-0.01%)` | :arrow_down: |

------

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

lgtm. @WillAyd 
@bashtage can you fix merge conflict and ping on green?
@WillAyd green.
thanks @bashtage