CSVReader - bug when using " for escape char

前端 未结 3 1177
孤城傲影
孤城傲影 2021-01-15 09:20

I am using OpenCSV.

I have a CSVReader trying to parse a CSV file.
That file has quote char \" and separator char , an

3条回答
  •  隐瞒了意图╮
    2021-01-15 09:55

    It cannot be done through CSVReader

    from pyspark.sql.session import SparkSession
    
    spark = SparkSession(sc)
    rdd = spark.read.csv("csv.csv", multiLine=True, header="False", encoding='utf-8', escape= "\"")
    

提交回复
热议问题