Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Don't skip blank lines in pandas.read_excel()

According to multiple sources on SO (1, 2, 3), the pandas method read_excel() has the option skip_blank_lines to control whether pandas parses blank rows in an excel file as blank rows in a DataFrame. However, the current documentation does not mention this. Has it been deprecated? If so, when, and, most importantly, how can I replicate the effect of skip_blank_lines=False without it?

like image 272
Mike S Avatar asked Feb 26 '19 16:02

Mike S


1 Answers

This method has not been deprecated as of the latest release, and I don't know of any intentions to deprecate it (0.24.1 does not produce a future warning when using this method).

As to why it's not documented on the read_excel page, I believe it's because skip_blank_lines=False is passed as a keyword argument to TextFileReader (which is hinted at in the documentation).

like image 174
jwalton Avatar answered Sep 20 '22 11:09

jwalton