Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Add double quotes to the StringType columns

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
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.