运行以下Python Panda代码时:
xl = pd.ExcelFile(dataFileUrl)
sheets = xl.sheet_names
data = xl.parse(sheets[0])
colheaders = list(data)
我收到ValueError:
Must explicitly set engine if not passing in buffer or path for io
该文件肯定是一个excel文件,毫无疑问.
怎么了?
解决方法:
我会尝试
xl = pd.ExcelFile(dataFileUrl, engine='xlrd')