How to explode multiple columns of a dataframe in pyspark : <p>I have a dataframe which consists lists in columns similar to the following. The length of the lists in all columns is not same. </p>

<pre><code>Name  Age  Subjects                  Grades
[Bob] [16] [Maths,Physics,Chemistry] [A,B,C]
</code></pre>

<p>I want to explode the dataframe in such a way that i get the following output-</p>

<pre><code>Name Age Subjects Grades
Bob  16   Maths     A
Bob  16  Physics    B
Bob  16  Chemistry  C
</code></pre>

<p>How can I achieve this?</p>
