Choosing whether to skip over blank rows

Sometimes whole rows have no values; hence, we can choose what to do with these rows while reading data. By default, read_csv ignores blank rows, but we can turn this off by setting skip_blank_lines to False, as follows:

df = pd.read_csv('IMDB.csv', encoding = "ISO-8859-1", skip_blank_lines=False)

Get Mastering Exploratory Analysis with pandas now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.