diff options
author | Arun Isaac | 2025-09-01 16:12:38 +0100 |
---|---|---|
committer | Arun Isaac | 2025-09-01 16:51:08 +0100 |
commit | 1fd21ccc69d023cdc92dd473842a8e6877fbb65c (patch) | |
tree | 5bc0a52f54b1d8ff27be85c99057cb001a0735be | |
parent | 0a74dd660c10f7de53dcd4f109ab54278facd85c (diff) | |
download | pyhegp-1fd21ccc69d023cdc92dd473842a8e6877fbb65c.tar.gz pyhegp-1fd21ccc69d023cdc92dd473842a8e6877fbb65c.tar.lz pyhegp-1fd21ccc69d023cdc92dd473842a8e6877fbb65c.zip |
Do not skip blank lines when reading TSV files.
-rw-r--r-- | pyhegp/serialization.py | 7 |
1 files changed, 6 insertions, 1 deletions
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) |