title: Parse list of Json strings in a dataframe by converting the column into rows using pyspark?
body: <pre><code>//Input
  df = [ 
        ('{&quot;id&quot;:10, &quot;number&quot; : [&quot;1.1&quot;, &quot;1.2&quot;, &quot;1.3&quot;]}',),
        ('{&quot;id&quot;:20, &quot;number&quot; : [&quot;2.1&quot;, &quot;2.2&quot;, &quot;2.3&quot;]}',),
         ]
  </code></pre>
  <p>//Desired output in a dataframe</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">id</th>
  <th style="text-align: center;">number</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">10</td>
  <td style="text-align: center;">1.1</td>
  </tr>
  <tr>
  <td style="text-align: center;">10</td>
  <td style="text-align: center;">1.2</td>
  </tr>
  <tr>
  <td style="text-align: center;">10</td>
  <td style="text-align: center;">1.3</td>
  </tr>
  <tr>
  <td style="text-align: center;">20</td>
  <td style="text-align: center;">2.1</td>
  </tr>
  <tr>
  <td style="text-align: center;">20</td>
  <td style="text-align: center;">2.2</td>
  </tr>
  <tr>
  <td style="text-align: center;">20</td>
  <td style="text-align: center;">2.3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I tried withColumn but was only able to split it into 2 columns</p>
  <pre><code>df.withColumn(&quot;n&quot;,from_json(col(&quot;_1&quot;),Sch)).select(&quot;n.*&quot;)
  </code></pre>
  <p>How can I get the 2nd column to split into rows and the first column to be repeated for each number in pyspark?</p>
  <p>Any help would be greatly appreciated! TIA!</p>