pept.utilities.number_of_lines#

pept.utilities.number_of_lines(filepath_or_buffer)[source]#

Return the number of lines (or rows) in a file.

Parameters
filepath_or_bufferstr, path object or file-like object

Path to the file.

Returns
int

The number of lines in the file pointed at by filepath_or_buffer.