i am new to spark dataframe .i have a text file having data like
schoolid,classid,studentid,subject,marks
bjs,5,111,hindi,23
bjs,5,222,maths,78
bjs,7,333,bio,89
bjs,1,444,chemistry,67
ghs,2,555,bio,78
ghs,2,666,phy,56
ghs,9,777,drawing,56
i want to convert this data to dataframe and add 1 to each of the values under marks column
so code I am using is
val df = sparkSession.read.format("csv").option("header","true").load("samplefile1.txt")
val newdf = df.select(col($"marks"+1)).show()
but the error that I am getting is
type mismatch; found : org.apache.spark.sql.Column required: String
can I have help with the correct syntax