[英]Why can`t i import this CSV file from my computer into my jupyter notebook?
I was trying to import a csv file into my jupyter notebook online but i get an error message 我试图将csv文件导入我的jupyter笔记本在线,但我收到一条错误消息
import pandas as pd
Goo = pd.DataFrame.from_csv("C:\Users\Arcsa\Desktop\EXCEL\GOOG")
print(type(goo))
```
File "<ipython-input-3-7df5486c9aa2>", line 1
Goo = pd.DataFrame.from_csv("C:\Users\Arcsa\Desktop\EXCEL\GOOG")
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
the \\
char is escaping whats after it... and specifically \\U
tried to convert it to a Character with 32-bit hex value, as per String Literals docs \\
char在它之后逃避了什么......特别是\\U
试图将它转换为具有32位十六进制值的字符,根据String Literals docs
try using raw string for the path: 尝试使用原始字符串作为路径:
import pandas as pd
Goo = pd.DataFrame.from_csv(r"C:\Users\Arcsa\Desktop\EXCEL\GOOG")
print(type(goo))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.