0
我正在使用以下代码加载其中包含文本/注释的csv文件。Spark - CSV文本加载解析错误
val data = sqlContext
.read
.format("com.databricks.spark.csv")
.option("header", "true")
.option("inferSchema", "true")
.option("parserLib", "UNIVOCITY")
.load(dataPath)
.na.drop()
备注没有任何特定的格式。在加载期间,我得到这个错误:
com.univocity.parsers.common.TextParsingException: Error processing input: null
Identified line separator characters in the parsed content. This may be the cause of the error. The line separator in your parser settings is set to '\n'.
我会很感激任何帮助。谢谢。
从做文件范围的任何记录超过一行,IE浏览器的数据有有'\ N'里面你认为哪些字符成为“一个记录”? – radumanolescu
问题,我看到它的方式是与“”或[[种类的字符。而且,是的,有\ n个字符。但是,我需要火花把/ t/n当作一个记录。为什么它处理\ n ... – Ahsan