title: Transform nested dictionary key values to pyspark dataframe
body: <p>I have a Pyspark dataframe that looks like this:</p>
  <p><a href="https://i.stack.imgur.com/U7Ehp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U7Ehp.png" alt="enter image description here" /></a></p>
  <p>I would like extract those nested dictionaries in the &quot;dic&quot; column and transform them into PySpark dataframe. Like this:</p>
  <p><a href="https://i.stack.imgur.com/VPCrn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VPCrn.png" alt="enter image description here" /></a></p>
  <p>Please let me know how I can achieve this.</p>
  <p>Thanks!</p>