pyspark matrix with dummy variables : <p>Have two columns:</p>

<pre><code>ID  Text
1    a
2    b
3    c
</code></pre>

<p>How can I able to create matrix with dummy variables like this:</p>

<pre><code>ID a b c
1  1 0 0
2  0 1 0
3  0 0 1
</code></pre>

<p>Using pyspark library and its features?</p>
