case class Customers(custid: Int,cname: String,lname: String)
valpeopleDF = spark.sparkContext.textFile(“D:/Hadoop/Spark/SparkScala/customer_data.csv”)
.map(_.split(“,”))
.map(attribute => Customers(attribute(0).toInt,attribute(1),attribute(2)))
.toDF()