Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

I have dataframe with column json string I need to extract Jon string as dataframe ???

Highlighted

I have dataframe with column json string I need to extract Jon string as dataframe ???

New Contributor

My I have dataframe below

Df =spark.read.json("myjson.json",mutiLine=True)

Df.show()

Am getting below output

Body| offset|

{'name':'swathi'} |2345|

How I can extract json column from dataframe

Make it as another dataframe like below

I need results like below in pyspark

Name |offset

Swathi |2345

Please help me out how to do

Don't have an account?
Coming from Hortonworks? Activate your account here