Tayyab_Vohra
Contributor

Hi @Patrick Mascari​ can you try by using the SQL() function, I have written the code below with an example please check if that works for you.

 You can extract any escaped sequence in the column

data = spark.createDataFrame([("Alberto", 101), 
                              ("Dakota", 202), 
                              ("Kumar", 330),
                              ("Siva", 4),
                              ("Sree", 5),
                              ("Kavin", 6)], 
                                   ["Name", "$id"])
 
data.createOrReplaceTempView("temp_table")
sql("select `$id` as id, name from temp_table").show()