title: Transpose rows to columns in pyspark
body: <p>How can I transpose a Dataframe table with only one column and multiple rows like:</p>
  
  <pre><code>1
  2
  3
  5
  6
  7
  ...
  </code></pre>
  
  <p>to a dataframe with only one row and multiple columns like:</p>
  
  <pre><code>1,2,3,4,5,6,7,8,9,10,...
  </code></pre>