C:\User\AppData\Local\Microsoft\WindowsApps\python3.9.exe C:/User/Desktop/1.py
Traceback (most recent call last):
File "C:\Users\Desktop\1.py", line 4, in
data = pd.read_excel(inputfile, encoding='uff-8')
File "C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pandas\util_decorators.py", line 311, in wrapper
return func(*args, **kwargs)
TypeError: read_excel() got an unexpected keyword argument 'encoding'
1.1.0版本以后的pandas的read_excel方法就不支持关键字参数了,所以encoding没有了。
你试试去掉这个参数能不能正常打开
pd.read_excel(inputfile, encoding='uff-8')多了个参数encoding
看看这个,read_excel的参数
https://blog.csdn.net/acoolgiser/article/details/111944821