Fix blank line skipping in read_fwf, issue 22693
State: closed

- [x] closes #22693 
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Fixes the bug where blank lines are not skipped using read_fwf even when skip_blank_lines is set to true. Override default behaviour in FixedWidthFieldParser.

Labels:

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

 - There are no PEP8 issues in the file [`pandas/io/parsers.py`](https://github.com/xiejxie/pandas/blob/fafeb534c64084844757def6f712093897fc6637/pandas/io/parsers.py) !

 - There are no PEP8 issues in the file [`pandas/tests/io/parser/test_read_fwf.py`](https://github.com/xiejxie/pandas/blob/fafeb534c64084844757def6f712093897fc6637/pandas/tests/io/parser/test_read_fwf.py) !



##### Comment last updated on September 27, 2018 at 01:11 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22849?src=pr&el=h1) Report
> Merging [#22849](https://codecov.io/gh/pandas-dev/pandas/pull/22849?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/d115900f4f80d2f9016b41041bde1564980415b3?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #22849      +/-   ##
==========================================
+ Coverage   92.19%   92.19%   +<.01%     
==========================================
  Files         169      169              
  Lines       50827    50835       +8     
==========================================
+ Hits        46860    46868       +8     
  Misses       3967     3967
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.61% <100%> (ø)` | :arrow_up: |
| #single | `42.36% <12.5%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22849?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/22849/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.62% <100%> (+0.02%)` | :arrow_up: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/22849/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.2% <0%> (ø)` | :arrow_up: |

------

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

closing as stale. if you'd like to continue, pls ping.
Hi @jreback, just wondering if we could pick this up and continue the work of @xiejxie here? Seems like we are on track towards a fix, just need a bit more iteration. (Also I think the current test might result in a false positive, as `read_csv` is also affected by the bug?)
@dwalters feel free to open a new PR
> Hi @jreback, just wondering if we could pick this up and continue the work of @xiejxie here? Seems like we are on track towards a fix, just need a bit more iteration. (Also I think the current test might result in a false positive, as `read_csv` is also affected by the bug?)

@dvalters I would like to help but not sure how to do it. Any intuition on how to fix the `read_csv` bug?