Skip to content

Commit

Permalink
Fix excel bug
Browse files Browse the repository at this point in the history
  • Loading branch information
eachanjohnson committed Apr 23, 2024
1 parent a3a2861 commit 09765e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions carabiner/pd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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'),
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 09765e8

Please sign in to comment.