From 1fd21ccc69d023cdc92dd473842a8e6877fbb65c Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 1 Sep 2025 16:12:38 +0100 Subject: Do not skip blank lines when reading TSV files. --- pyhegp/serialization.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyhegp/serialization.py b/pyhegp/serialization.py index b234a5b..799109e 100644 --- a/pyhegp/serialization.py +++ b/pyhegp/serialization.py @@ -70,7 +70,12 @@ def read_tsv(file): return pd.read_csv(file, quoting=csv.QUOTE_NONE, sep="\t", - na_filter=False) + na_filter=False, + # Do not skip blank lines: for example, a data + # frame with only spaces separated by tabs. + # This is valid TSV, even though it is a weird + # data file. + skip_blank_lines=False) def read_genotype(file): df = read_tsv(file) -- cgit 1.4.1