简体   繁体   English

pd.read_csv("文件名.csv)运行失败

[英]pd.read_csv ("file name.csv) fails to run

My PD.read_csv in Pandas is not importing my.csv file for visual representation.It keeps returning an error message.我的 Pandas 中的 PD.read_csv 没有导入 my.csv 文件进行可视化表示。它一直返回错误消息。 What could be the problem?可能是什么问题呢? I have tried我努力了

data=pd.read_csv('Sample-Spreadsheet-10-rows.csv' encoding = "utf-8")
print data.head

This code has refused to compile.此代码已拒绝编译。

Missing comma before encoding编码前缺少逗号

data=pd.read_csv('Sample-Spreadsheet-10-rows.csv', encoding = "utf-8")

You can check this answer: https://stackoverflow.com/a/37136793/15809896 and follow the question and also the answer !您可以查看此答案: https://stackoverflow.com/a/37136793/15809896并关注问题和答案!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM