From c1ae85950a8f432f0e31c14f630db43fc2580ee9 Mon Sep 17 00:00:00 2001 From: Andrea Esuli Date: Mon, 23 Feb 2026 09:29:45 +0100 Subject: [PATCH] Fix regex for whitespace delimiter in CSV reads --- quapy/data/datasets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quapy/data/datasets.py b/quapy/data/datasets.py index 801b968..e9bc20a 100644 --- a/quapy/data/datasets.py +++ b/quapy/data/datasets.py @@ -486,7 +486,7 @@ def download(id: int | None, group: str) -> dict: # fall back to direct download when needed if group == "german": with download_tmp_file("statlog/german", "german.data-numeric") as tmp: - df = pd.read_csv(tmp, header=None, delim_whitespace=True) + df = pd.read_csv(tmp, header=None, sep="\\s+") X, y = df.iloc[:, 0:24].astype(float).values, df[24].astype(int).values elif group == "ctg": with download_tmp_file("00193", "CTG.xls") as tmp: @@ -500,7 +500,7 @@ def download(id: int | None, group: str) -> dict: y = df["NSP"].astype(int).values elif group == "semeion": with download_tmp_file("semeion", "semeion.data") as tmp: - df = pd.read_csv(tmp, header=None, sep='\s+') + df = pd.read_csv(tmp, header=None, sep="\\s+") X = df.iloc[:, 0:256].astype(float).values y = df[263].values # 263 stands for digit 8 (labels are one-hot vectors from col 256-266) else: