Python2年生
P110 chap3/chap3-24.### ヘディングのテキストpy の出力結果が表示されません
解決方法を教示いただきたいです。
(コード)
import pandas as pd```python
コード
import openpyxl # Excelファイルを読み込む df = pd.read_excel("csv_to_excel3.xlsx") print(df) df = pd.read_excel("csv_to_excel3.xlsx", sheet_name="国語でソート") print(df) (表示されるエラー) Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> RESTART: C:\Users\User\Documents\python\download\python2nen_sample\chap3\chap3-23.py Traceback (most recent call last):File "C:\Users\User\Documents\python\download\python2nen_sample\chap3\chap3-23.py", line 5, in <module> df = pd.read_excel("csv_to_excel2.xlsx") File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\util\_decorators.py", line 296, in wrapper return func(*args, **kwargs) File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\excel\_base.py", line 304, in read_excel io = ExcelFile(io, engine=engine) File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\excel\_base.py", line 867, in __init__ self._reader = self._engines[engine](self._io) File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\excel\_xlrd.py", line 22, in __init__ super().__init__(filepath_or_buffer) File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\excel\_base.py", line 353, in __init__ self.book = self.load_workbook(filepath_or_buffer) File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\excel\_xlrd.py", line 37, in load_workbook return open_workbook(filepath_or_buffer) File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xlrd\__init__.py", line 170, in open_workbook raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported') xlrd.biffh.XLRDError: Excel xlsx file; not supported >>> (バージョン) Python 3.6.1
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2022/02/12 02:30