0

I am new to scala and I have a requirement to remove header from csv file and then write into parquet format file using scala.

I am trying this but how do I remove the header:

val df = spark.read.format("csv").load("path")

Can someone please help on this.

Thanks Sandeep

Seth Tisue
  • 29,985
  • 11
  • 82
  • 149
sandeep
  • 13
  • 3
  • Hi @GuruStron Thanks for the response. Its not working when i used like below spark.read.format("CSV").option("header","true").load("path"). The code is not working . Do you need to import anything? – sandeep Jan 05 '22 at 22:30
  • 1
    Do you have any exception/build error? "is not working" does not say much. – Guru Stron Jan 05 '22 at 22:40
  • Thank you. Its resolved now with option("header","true") – sandeep Jan 07 '22 at 15:49

0 Answers0