title: How to convert Iterable[String, String, String] to DataFrame?
body: <p>I have a dataset of <code>(String, String, String)</code> which is about 6GB. After parsing the dataset I did <code>groupby</code> using <code>(element =&gt; element._2)</code> and got <code>RDD[(String, Iterable[String, String, String])]</code>. Then <code>foreach</code> element in <code>groupby</code> I am doing <code>toList</code> in-order to convert it to <code>DataFrame</code>.</p>
  
  <pre><code>val dataFrame = groupbyElement._2.toList.toDF()
  </code></pre>
  
  <p>But It is taking a huge amount of time to save data as parquet file format.
  Is there any efficient way I can use?
  N.B. I have five node cluster. Each node has 28 GB RAM and 4 cores. I am using standalone mode and giving 16 GB RAM to each executor.</p>