Yes there are similar functions available, depending on your spark version
look up Pyspark SQL Function module documentation. I also prefer to use SQL
directly within pyspark.

On Thu, Oct 20, 2016 at 8:18 PM, Mendelson, Assaf <assaf.mendel...@rsa.com>
wrote:

> Depending on your usecase, you may want to take a look at window functions
>
>
>
> *From:* muhammet pakyürek [mailto:mpa...@hotmail.com]
> *Sent:* Thursday, October 20, 2016 11:36 AM
> *To:* user@spark.apache.org
> *Subject:* pyspark dataframe codes for lead lag to column
>
>
>
>
>
>
>
> is there pyspark dataframe codes for lead lag to column?
>
>
>
> lead/lag column is something
>
>
>
> 1      lag   -1        lead     2
>
> 2                1                    3
>
> 3                2                    4
>
> 4                3                    5
>
> 5                4                   -1
>



-- 
Best Regards,
Ayan Guha

Reply via email to