You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Marius Danciu <ma...@gmail.com> on 2015/07/16 13:26:45 UTC

DataFrame from RDD[Row]

Hi,

This is an ugly solution because it requires pulling out a row:

    val rdd: RDD[Row] = ...
    ctx.createDataFrame(rdd, rdd.first().schema)

Is there a better alternative to get a DataFrame from an RDD[Row] since
toDF won't work as Row is not a Product ?


Thanks,
Marius