We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
import io import pandas as pd pd.read_csv(io.StringIO('a0, a1, a2\n b0, b1, b2\n'), header=[0, 1], index_col=0)
This is a legal, if empty, csv. Note that variations such as
pd.read_csv(io.StringIO('a0, a1, a2\n'), header=[0], index_col=0), pd.read_csv(io.StringIO('a0, a1, a2\n b0, b1, b2\n'), header=[0, 1]), and pd.read_csv(io.StringIO('a0, a1, a2\n b0, b1, b2\ndata,data'), header=[0, 1], index_col=0) work fine.
pd.read_csv(io.StringIO('a0, a1, a2\n'), header=[0], index_col=0)
pd.read_csv(io.StringIO('a0, a1, a2\n b0, b1, b2\n'), header=[0, 1])
pd.read_csv(io.StringIO('a0, a1, a2\n b0, b1, b2\ndata,data'), header=[0, 1], index_col=0)
Empty DataFrame Columns: [( a1, b1), ( a2, b2)] Index: []
pd.show_versions()
commit : 67a3d42 python : 3.9.0.final.0 python-bits : 64 OS : Darwin OS-release : 19.6.0 Version : Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8
pandas : 1.1.4 numpy : 1.19.4 pytz : 2020.4 dateutil : 2.8.1 pip : 20.2.3 setuptools : 49.2.1 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 : 7.19.0 pandas_datareader: None bs4 : None bottleneck : None fsspec : None fastparquet : None gcsfs : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pyxlsb : None s3fs : None scipy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None numba : None
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
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, a copy-pastable example
Problem description
This is a legal, if empty, csv. Note that variations such as
pd.read_csv(io.StringIO('a0, a1, a2\n'), header=[0], index_col=0)
,pd.read_csv(io.StringIO('a0, a1, a2\n b0, b1, b2\n'), header=[0, 1])
, andpd.read_csv(io.StringIO('a0, a1, a2\n b0, b1, b2\ndata,data'), header=[0, 1], index_col=0)
work fine.Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 67a3d42
python : 3.9.0.final.0
python-bits : 64
OS : Darwin
OS-release : 19.6.0
Version : Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.1.4
numpy : 1.19.4
pytz : 2020.4
dateutil : 2.8.1
pip : 20.2.3
setuptools : 49.2.1
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 : 7.19.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: