CLN: replace %s syntax with .format in pandas.io.parsers
State: closed

progress towards #16130

- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`


Labels:
name: Strings
description: String extension data type and string data
name: Clean

Comments:
The error occurred on python 2.7 from CI.
Is there any person who knows how I can run the test on python 2.7? I wanna know the environment setting.
@makeajourney you could create a conda environment using Python 2.7 locally to test
@makeajourney can you merge master here?
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24721?src=pr&el=h1) Report
> Merging [#24721](https://codecov.io/gh/pandas-dev/pandas/pull/24721?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/149138ef008a26bca04f4b698e15ff8fd3ce4663?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `94.11%`.

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

```diff
@@            Coverage Diff             @@
##           master   #24721      +/-   ##
==========================================
+ Coverage   92.37%   92.38%   +<.01%     
==========================================
  Files         166      166              
  Lines       52397    52321      -76     
==========================================
- Hits        48404    48338      -66     
+ Misses       3993     3983      -10
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.8% <94.11%> (ø)` | :arrow_up: |
| #single | `43.06% <5.88%> (+0.18%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24721?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.4% <94.11%> (+0.05%)` | :arrow_up: |
| [pandas/tseries/frequencies.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvZnJlcXVlbmNpZXMucHk=) | `97.08% <0%> (-0.63%)` | :arrow_down: |
| [pandas/core/arrays/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3RpbWVkZWx0YXMucHk=) | `87.86% <0%> (-0.45%)` | :arrow_down: |
| [pandas/core/reshape/merge.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9tZXJnZS5weQ==) | `94.26% <0%> (-0.22%)` | :arrow_down: |
| [pandas/plotting/\_timeseries.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL190aW1lc2VyaWVzLnB5) | `65.28% <0%> (-0.18%)` | :arrow_down: |
| [pandas/core/computation/expr.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tcHV0YXRpb24vZXhwci5weQ==) | `88.57% <0%> (-0.12%)` | :arrow_down: |
| [pandas/core/reshape/tile.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS90aWxlLnB5) | `94.88% <0%> (-0.06%)` | :arrow_down: |
| [pandas/core/arrays/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2NhdGVnb3JpY2FsLnB5) | `95.93% <0%> (-0.05%)` | :arrow_down: |
| [pandas/core/arrays/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lcy5weQ==) | `97.75% <0%> (-0.05%)` | :arrow_down: |
| [pandas/core/arrays/interval.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2ludGVydmFsLnB5) | `93.08% <0%> (-0.04%)` | :arrow_down: |
| ... and [39 more](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree-more) | |

------

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

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

```diff
@@            Coverage Diff             @@
##           master   #24721      +/-   ##
==========================================
+ Coverage   91.73%   91.73%   +<.01%     
==========================================
  Files         173      173              
  Lines       52845    52845              
==========================================
+ Hits        48479    48480       +1     
+ Misses       4366     4365       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.3% <94.11%> (ø)` | :arrow_up: |
| #single | `41.72% <5.88%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24721?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.34% <94.11%> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/24721/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `87.66% <0%> (+0.09%)` | :arrow_up: |

------

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

can you merge master
Hello @makeajourney! 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-03-19 19:08:27 UTC
Can you merge master and check CI failures?
I tried to install the python 2.7 using the pyenv, but I failed. At the same time, I tried to install and used the anaconda2, but It was a bad idea. Anyway, I've been finding another way to test with the python2.7 environment. Maybe I can use the docker to test. 
@makeajourney if you already have conda installed you shouldn't need a separate installation to get a Py27 environment up. 

https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands

```sh
conda create -n pandas-dev2 python=2.7
```
OK no worries. We are going to drop Py27 supported with the 0.25 release anyway so I would think it's OK to ignore any Py27 failures for that release (unless @jreback objects).

Okay.
Then I'm going to drop some commits related to the above problems. That's not good to look.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24721?src=pr&el=h1) Report
> Merging [#24721](https://codecov.io/gh/pandas-dev/pandas/pull/24721?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/c975fc437744a62fffcc4a519cc124b025035f26?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `94.11%`.

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

```diff
@@           Coverage Diff           @@
##           master   #24721   +/-   ##
=======================================
  Coverage   91.26%   91.26%           
=======================================
  Files         172      172           
  Lines       52965    52965           
=======================================
  Hits        48337    48337           
  Misses       4628     4628
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.82% <94.11%> (ø)` | :arrow_up: |
| #single | `41.74% <5.88%> (ø)` | :arrow_up: |

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

------

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

@makeajourney we just dropped the Py27 CI jobs - want to merge master to give this another shot?
@WillAyd Thanks for letting me know :) I wish there's no more error 😁
pls merge master
thanks !