CSVReader - bug when using " for escape char

前端 未结 3 1708
忘掉有多难
忘掉有多难 2021-01-15 09:30

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 10:05

    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= "\"")
    

提交回复
热议问题