Support Questions

Find answers, ask questions, and share your expertise

Add double quotes to the StringType columns

avatar
New Contributor

Hi All,

I am trying to add double quotes around the column type that are of string type in spark dataframe, how can I do that

 

for eg

 

Initial DF

col1    |   col2    | col3

1        |    abc     | px01

 

After adding the quotes to the alphanumeric data ie to the string type columns the final dataframe should be

 

col1    |   col2       |  col3

1        |    "abc"     | "px01"

 

0 REPLIES 0