Skip to content

Instantly share code, notes, and snippets.

@akhilanandbv003
Created February 25, 2019 04:50
Show Gist options
  • Save akhilanandbv003/f9cbbda7ad3abeb09b8c47d91b6f6c2b to your computer and use it in GitHub Desktop.
Save akhilanandbv003/f9cbbda7ad3abeb09b8c47d91b6f6c2b to your computer and use it in GitHub Desktop.
Customer dataframe
scala> val customer = sc.parallelize(Seq((101,"Jon") , (102,"Aron") ,(103,"Sam"))).toDF("customerId", "name")
customer: org.apache.spark.sql.DataFrame = [customerId: int, name: string]
scala> customer.show
+----------+----+
|customerId|name|
+----------+----+
| 101| Jon|
| 102|Aron|
| 103| Sam|
+----------+----+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment