已解决Excel file format cannot be determined, you must specify an engine manually

问题

我使用以下语句时出现错误

data = pd.read_excel('temp_inputc.csv', header=None)

出现错误:

Excel file format cannot be determined, you must specify an engine manually

有很多人说添加engine,但接下来会出现这个错误:

File is not a zip file

解决方法:

data = pd.read_csv('temp_inputc.csv', header=None)

读取csv文件时需要用pd.read_csv

OK,已解决

你可能感兴趣的:(excel,python)