我正在尝试读取名为df1的数据集,但它不起作用
import pandas as pd
df1=pd.read_csv("https://raw.githubusercontent.com/tuyenhavan/Statistics/Dataset/World_Life_Expectancy.csv",sep=";")
df1.head()
Run Code Online (Sandbox Code Playgroud)
这是上述代码中的重大错误,但这是最相关的
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 18: invalid start byte
Run Code Online (Sandbox Code Playgroud) 我想下载一个压缩在 open-plaques-all-2017-06-19.rar 中的文件,但是在 R 中没有实现它。请看我下面的代码
temp <- tempfile()
download.file("https://github.com/tuyenhavan/Statistics/blob/master/open-plaques-all-2017-06-19.rar", temp)
df<- fread(unzip(temp, files = "open-plaques-all-2017-06-19.csv"))
head(df)
Run Code Online (Sandbox Code Playgroud)