-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
sheet_name
argument from read_excel
is always giving the first sheet
#17107
Comments
@rubennj : Thanks for the report! We have this catch-all I hope this clarifies your confusion! |
Hello, I'm facing the above mentioned issue of "sheet_name" returning the first sheet always, with pandas 0.21.1 I tried switching to older versions but it didn't work out. |
Hi, I used sheet_name = ['Sheet1', 'Sheet2'], it's supposed to return a dict of dataframe, but it only returns the first sheet |
@PraveerNarwelkar @JackZL Can you show the result of |
@jorisvandenbossche Sorry, my mistake. it works fine in 0.21.0. my previous version is 0.20.3. |
I can also confirm this is resolved after upgrading from 0.20.1 to 0.23.4 |
Thank you! Upgrading to 0.23.4 helped. |
Upgrading did not help in my case
|
I can confirm this issue is still happening. I suspect there is some issue with the encoding of the text. INSTALLED VERSIONScommit : 0f43794 pandas : 2.0.3 |
This issue is still happening. Running Linux Mint 21.3, xfce 4.18.1 Trying to read an Excel xlsx file with 4 sheets from a PyQt6 app using Python 3.11 sheet_name=0 works fine. Otherwise the call fails. Doesn't matter if I use the index or the sheet name. Traceback (most recent call last): from pip list in my venv et_xmlfile 2.0.0 from pandas.show_versions()
|
Code Sample, a copy-pastable example if possible
Problem description
First of all, right now there is PR #16442 to homogenize arguments names, but in 0.20.3 both arguments are accepted although only
sheetname
is documented.The problem is that
sheet_name
is silently failing and returning always the first sheet.sheetname
is OK, but with PR #16442 this issue could be already fixed or even more messy.Expected Output
The chosen sheet.
Output of
pd.show_versions()
commit: None
python: 3.6.2.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 61 Stepping 4, GenuineIntel
byteorder: little
LC_ALL: None
LANG: es
LOCALE: None.None
pandas: 0.20.3
pytest: None
pip: 9.0.1
setuptools: 27.2.0
Cython: None
numpy: 1.13.1
scipy: 0.19.1
xarray: None
IPython: 6.1.0
sphinx: 1.6.2
patsy: None
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: 0.4.0
matplotlib: 2.0.2
openpyxl: 2.4.7
xlrd: 1.0.0
xlwt: None
xlsxwriter: 0.9.6
lxml: 3.7.3
bs4: 4.6.0
html5lib: 0.999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: