Spark, Data Science, Tutorial, Machine Learning, Machine Intelligence.
alone spark session and assigning to variable and creating an data frame from CSV and creating row number by using Window imported from org.apache.spark.sql.expressions.Window and removing unwanted records from csv. and generating mean at the last line data.select(mean("value") as "mean").show() 2)