BUG: Properly parse unicode usecols names in CSV
State: closed

Closes #13253.


Labels:
name: Unicode
description: Unicode strings
name: IO CSV
description: read_csv, to_csv

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24856?src=pr&el=h1) Report
> Merging [#24856](https://codecov.io/gh/pandas-dev/pandas/pull/24856?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/01e7872b018f8ceb1c5d1217caf03d5ba4da3602?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `87.5%`.

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

```diff
@@            Coverage Diff             @@
##           master   #24856      +/-   ##
==========================================
- Coverage   92.39%   92.39%   -0.01%     
==========================================
  Files         166      166              
  Lines       52391    52394       +3     
==========================================
+ Hits        48407    48409       +2     
- Misses       3984     3985       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.81% <87.5%> (-0.01%)` | :arrow_down: |
| #single | `42.89% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24856?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/24856/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.34% <87.5%> (-0.06%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24856?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/24856?src=pr&el=footer). Last update [01e7872...5406671](https://codecov.io/gh/pandas-dev/pandas/pull/24856?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/24856?src=pr&el=h1) Report
> Merging [#24856](https://codecov.io/gh/pandas-dev/pandas/pull/24856?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/01e7872b018f8ceb1c5d1217caf03d5ba4da3602?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `87.5%`.

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

```diff
@@            Coverage Diff             @@
##           master   #24856      +/-   ##
==========================================
- Coverage   92.39%   92.39%   -0.01%     
==========================================
  Files         166      166              
  Lines       52391    52394       +3     
==========================================
+ Hits        48407    48409       +2     
- Misses       3984     3985       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.81% <87.5%> (-0.01%)` | :arrow_down: |
| #single | `42.89% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24856?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/24856/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.34% <87.5%> (-0.06%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24856?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/24856?src=pr&el=footer). Last update [01e7872...987d5b0](https://codecov.io/gh/pandas-dev/pandas/pull/24856?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/24856?src=pr&el=h1) Report
> Merging [#24856](https://codecov.io/gh/pandas-dev/pandas/pull/24856?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/01e7872b018f8ceb1c5d1217caf03d5ba4da3602?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `87.5%`.

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

```diff
@@            Coverage Diff             @@
##           master   #24856      +/-   ##
==========================================
- Coverage   92.39%   92.39%   -0.01%     
==========================================
  Files         166      166              
  Lines       52391    52394       +3     
==========================================
+ Hits        48407    48408       +1     
- Misses       3984     3986       +2
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.81% <87.5%> (-0.01%)` | :arrow_down: |
| #single | `42.89% <0%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24856?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/24856/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.34% <87.5%> (-0.06%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/24856/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `88.04% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24856?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/24856?src=pr&el=footer). Last update [01e7872...987d5b0](https://codecov.io/gh/pandas-dev/pandas/pull/24856?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/24856?src=pr&el=h1) Report
> Merging [#24856](https://codecov.io/gh/pandas-dev/pandas/pull/24856?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/402d5dbd455bf35b875ea3c57feeef3141eb2bf0?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `77.77%`.

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

```diff
@@            Coverage Diff             @@
##           master   #24856      +/-   ##
==========================================
- Coverage   92.39%   92.39%   -0.01%     
==========================================
  Files         166      166              
  Lines       52391    52395       +4     
==========================================
+ Hits        48407    48408       +1     
- Misses       3984     3987       +3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.81% <77.77%> (-0.01%)` | :arrow_down: |
| #single | `42.89% <0%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24856?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/24856/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.28% <77.77%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/24856/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `88.04% <0%> (-0.1%)` | :arrow_down: |

------

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

lgtm. @WillAyd 
Thanks @gfyoung !