-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
read_excel failed with specific configuration #15835
New issue
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
Comments
pre_kwargs = {
"sheetname" : "Sheet1",
"parse_cols" : [0,3],
"keep_default_na" : False,
"na_values" : set(), # addition
"header" : 0
}
f = 'https://github.com/pandas-dev/pandas/files/879107/test12.xlsx'
pd.read_excel(f, **pre_kwargs)
Out[87]:
1
0 1 |
@fortooon : Nice catch! You just happened to hit a corner case in parsing: >>> from pandas import read_csv
>>> from pandas.compat import StringIO
>>>
>>> data = "a,1\b,2"
>>> read_csv(StringIO(data), keep_default_na=False, index_col=0)
...
TypeError: unsupported operand type(s) for |: 'list' and 'set' Note that this is using the C engine (also breaks with the Python engine). PR coming soon to patch this. @jreback : This is not @chris-b1 : This is not a |
Code Sample to reproduce bug
use attached file : test12.xlsx
Problem description
I can't read row as header with empty value cell with number formatting.
Parser just failed.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.7.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-66-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.17.1
nose: None
pip: 7.0.3
setuptools: 1.1.6
Cython: None
numpy: 1.7.1
scipy: 0.14.0
statsmodels: None
IPython: 0.13.2
sphinx: None
patsy: None
dateutil: 2.3
pytz: 2014.10
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: 2.3.0
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
Jinja2: None
The text was updated successfully, but these errors were encountered: