摘要:
将以下内容保存为small_zipcode.csv id,zipcode,type,city,state,population 1,704,STANDARD,,PR,30100 2,704,,PASEO COSTA DEL SUR,PR, 3,709,,BDA SAN LUIS,PR,3700 4, 阅读全文
摘要:
删除表中全部为NaN的行 df.na.drop("all") 删除表任一列中有NaN的行 df.na.drop("any") 示例: scala> df.show + + + + + + + | id|zipcode| type| city|state|population| + + + + + + 阅读全文
摘要:
scala> val a = Seq(("a", 2),("b",3)).toDF("name","score") a: org.apache.spark.sql.DataFrame = [name: string, score: int] scala> a.show() + + + |name|s 阅读全文