title: Convert scala FP-growth RDD output to Data frame
body: <p><a href="https://spark.apache.org/docs/2.1.0/mllib-frequent-pattern-mining.html#fp-growth" rel="nofollow noreferrer">https://spark.apache.org/docs/2.1.0/mllib-frequent-pattern-mining.html#fp-growth</a></p>
  
  <p>sample_fpgrowth.txt can be found here,
  <a href="https://github.com/apache/spark/blob/master/data/mllib/sample_fpgrowth.txt" rel="nofollow noreferrer">https://github.com/apache/spark/blob/master/data/mllib/sample_fpgrowth.txt</a></p>
  
  <p>I ran the FP-growth example in the link above in scala its working fine, but what i need is, how to convert the result which is in RDD to data frame. 
  Both these RDD</p>
  
  <pre><code> model.freqItemsets and 
   model.generateAssociationRules(minConfidence)
  </code></pre>
  
  <p>explain that in detail with the example given in my question.</p>