From 09765e850e6dc206e098e6761361e5bd79887e36 Mon Sep 17 00:00:00 2001 From: Eachan Johnson Date: Tue, 23 Apr 2024 09:48:14 +0100 Subject: [PATCH] Fix excel bug --- carabiner/pd/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/carabiner/pd/utils.py b/carabiner/pd/utils.py index 5a02733..c36fa0e 100644 --- a/carabiner/pd/utils.py +++ b/carabiner/pd/utils.py @@ -9,7 +9,7 @@ try: import pandas as pd except ImportError: - raise ImportError("\Pandas not installed. Try installing with pip:" + raise ImportError("Pandas not installed. Try installing with pip:" "\n$ pip install pandas\n" "\nor reinstall carabiner with pandas:\n" "\n$ pip install carabiner[pd]\n") @@ -39,7 +39,7 @@ def __post_init__(self): self.out_delim = self.out_delim or self.in_delim if self.in_delim == '\t': - self.in_delim = '\s+' + self.in_delim = r'\s+' _FORMAT: Dict[str, IOFormat] = {'.txt' : IOFormat('\t'), @@ -311,9 +311,9 @@ def read_table(file: Union[str, IO], """ delimiter = resolve_delim(file, format, - default='\s+') + default='\t') - if delimiter != 'xlsx': + if delimiter.in_delim != 'xlsx': return read_csv(file, sep=delimiter.in_delim,