spark how to remove last line in a csv file
问题 I am new to spark I want to remove header and last line from a csv file Notes xyz "id","member_id" "60045257","63989975", "60981766","65023535", Total amount:4444228900 Total amount: 133826689 I want to remove line Notes xyz , Total amount:4444228900 and Total amount: 133826689 from the file .I have removed the first line from the file val dfRetail = sc.textFile("file:////home/cloudera/Projects/Project3/test/test_3.csv"); var header=dfRetail.first(); var final_data=dfRetail.filter(row => row!