Open ptgolden opened 5 days ago
It looks like that clause was introduced in 80cf06858072a5a53fd0330f06d632373eda58ae, which means 3 years and no reports of output consisting solely of "NaN"
skip_blank_lines
is never set to false, because it's not passed to the CSVReader constructor when reading a source:
Can we remove this option? Either blank lines can always be skipped (which is the current behavior), or they can cause an error (due to being malformed CSV).
The second clause here should be
elif not row
orelif row == []
.https://github.com/monarch-initiative/koza/blob/fceafe5755e222dba14cecf8b7df09ca7dd16831/src/koza/io/reader/csv_reader.py#L126-L130
Since it's not, if
skip_blank_lines=False
is passed to the reader, then in all cases, every value read will be'NaN'
forstr
types,nan
forfloat
types, and raise an error forint
types.I'm surprised no one has ever run into this-- it suggests that no one has ever used the non-default option of
skip_blank_lines
.