Support Questions
Find answers, ask questions, and share your expertise

How to Iterate through each row in data-frame and perform action on it

How to Iterate through each row in data-frame and perform action on it

Contributor

Hi,

 

I have the below requirement, i need to iterate through each rows in data-frame against remaining rows and need to apply some transformation on it.

 

I'm using Pyspark.

I tried using python function it is not applying to each row.

I tried UDF but it seems UDF will not accept Dataframe object as input

 

Is there any way to address my problem ?

 

Regards,

MJ