How to calculate a column in a Row using two columns of the previous Row in Spark Data Frame?,df.show()