Need to add headers in existing data frame

43 views Asked by At

I am loading a csv file like below, The file contain a header but i need to additional header over top of the line. I tried many ways in pyspark but end with zero. Could anyone guide me further.

Sample Input enter image description here

Sample output:

enter image description here

I loaded the file like below

df=spark.read.csv(path,header=True,inferschema=True)

Over that i tried many ways to add a additional header but nothing helps

0

There are 0 answers