我刚刚开始学习教程,但遇到了:(
这是代码
from io import BytesIO
import pandas
table1 = BytesIO(resp1.content)
pandas.read_excel(table1)
(我正在使用Jupyter笔记本水蟒) 如果我把它放上去 之后,我只写
pandas.read_excel(table1)
并且有一个错误"I/O operation on closed file"
所以我再次全部重写,它可以正常工作。 我不知道会发生什么,我认为熊猫已经过期了?
我想要的是将“ pandas.read_excel(table1)
”定义为数据,以便将结果复制到本地计算机上。/ data = pandas.read_excel(table1) /
请帮助我... enter image description here
答案 0 :(得分:0)
pandas.read_excel(table1)
以上命令不正确。 您需要在开头放置一个数据框以读取Excel,例如:
df=pandas.read_excel(table1)