我正在尝试使用pandas读取.csv文件
df = pd.read_csv('ChildCareCenters06252017.csv')
然后我得到这个错误
CParserError: Error tokenizing data. C error: Expected 31 fields in line 3, saw 42
我读过熊猫文档,也读过其他类似的文章,但是没有解决方案。你知道吗
我要去这个链接 https://secure.dss.ca.gov/CareFacilitySearch/DownloadData 然后点击托儿中心,保存数据并尝试阅读。你知道吗
这就是.csv在文本编辑中的样子。 Header and the first couple school entries.
我下载了
.csv
,将其保存为.xlsx
文件,然后改用read_excel()
,这很有效:相关问题 更多 >
编程相关推荐