Looping through a spark dataframe. How to loop through each row of dataFrame in pyspark.