In scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : EOF within quoted string

我在读取csv文件时,如sms_raw <- read.csv("E:/R/mlrdatasets/sms_spam.csv", stringsAsFactors = FALSE)
出现如下警告提示:

Warning message:
In scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
  EOF within quoted string


方法一:调用Sys.setlocale("LC_ALL", "English")
方法二:禁用qutoe,即设置quote = "",你把语句改为sms_raw <- read.csv("E:/R/mlrdatasets/sms_spam.csv", stringsAsFactors = FALSE,quote = "")
方法三:编码问题,把读取编码设置为fileEncoding = "Latin1"

你可能感兴趣的:(python)