You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception should not be raised either with sep=' - ' or with sep=b' - '.
Not sure which one is the correct, although I see no issues with sep=' - ' when memory_map=True is not set.
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample
Data Sample
Problem description
I'm getting an exception:
from this line:
pandas/pandas/io/parsers.py
Line 2472 in 14eda58
since
f.readline()
returns a byte-string.And if I change separator to
sep=b' - '
, a similar exception:gets raised from the following line:
pandas/pandas/io/parsers.py
Line 2475 in 14eda58
since
for line in f:
yields normal strings.Expected Output
Exception should not be raised either with
sep=' - '
or withsep=b' - '
.Not sure which one is the correct, although I see no issues with
sep=' - '
whenmemory_map=True
is not set.Workaround
Changing lines
pandas/pandas/io/parsers.py
Lines 2474 to 2475 in 14eda58
to
fixes
read_table
for byte-string separators (e.g.sep=b' - '
).Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.7.5.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 63 Stepping 2, GenuineIntel
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : None.None
pandas : 1.0.4
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 41.2.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 1.3.17
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : None
The text was updated successfully, but these errors were encountered: