Description
Code Sample, a copy-pastable example if possible
xls = pandas.ExcelFile(path, on_demand = True)
sheets = xls.sheet_names
Problem description
This code used to work, since extra keyword arguments were passed to xlrd.open_workbook
. As pd.ExcelFile
is now decoupled from xlrd
this behaviour was removed. It now returns an error:
TypeError: __init__() got an unexpected keyword argument 'on_demand'
In a way this is related to #25523, but this is a more general issue, and might or might not solve the problem in the other issue.
Expected Output
No error, and the keyword arguments respected. I understand that when other engines are implemented the on_demand
argument might not make sense, but they might take similar arguments not explicitly made available in the interface of pandas.ExcelFile
.
Output of pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.7.2.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.1
pytest: 4.2.0
pip: 19.0.1
setuptools: 40.7.3
Cython: 0.29.5
numpy: 1.15.4
scipy: 1.2.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: 1.8.4
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.9
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.9
feather: None
matplotlib: 3.0.2
openpyxl: 2.5.14
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.2
lxml.etree: 4.3.0
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: 1.2.17
pymysql: None
psycopg2: 2.7.6.1 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None