一、类型 1、查看对象的类型 data_origin.getClass.getSimpleName res6: String = DataFrame 2、类型的转化 DataFrame 转RDD类型。 S1: 看DataFrame的api:http://spark.apache.org/docs/1.6.3/api/scala/index.html#org.apache.spark.sql.DataFrame 里面有一个方法: lazy valrdd: RDD[Row] Represents the content of the DataFrame as an RDD of Rows.