title: Convert Array form (as String) to Column in Pyspark
body: <p>I have a df with this form:</p>
  
  <pre><code>+---------------------------------------+
  |ID|ESTRUC_COMP                         |
  +---------------------------------------+
  |4A|{'AP': '201', 'BQ': '2'}            |
  |8B| {'AP': '501', 'BQ': '1', 'IN': '5'}|
  +---------------------------------------+
  </code></pre>
  
  <p>And I need something like this:</p>
  
  <pre><code>+------------------------------------------------+
  |ID|ESTRUC_COMP                        |AP |BQ|IN|
  +------------------------------------------------+
  |4A|{'AP': '201', 'BQ': '2'}           |201|2 |  |
  |8B|{'AP': '501', 'BQ': '1', 'IN': '5'}|501|1 |5 |
  +------------------------------------------------+
  </code></pre>
  
  <p>But, ESTRUC_COMP is a String. </p>
  
  <pre><code>root
   |-- ID: string (nullable = true)
   |-- ESTRUC_COMP: string (nullable = true)
  </code></pre>
  
  <p>How can I perform this transformation? Thank you in advance.</p>
  
  <p>Boris</p>