This is the code that I have tried to write the CSV file. Spark data frame would be written into a CSV file using pandas
from pyspark.sql.functions import pan