Saturday 17 April 2021

How to calculate rolling dates using pySpark

Lets calculate current year minus 3 years data using pySpark 
  
You can achieve this using F.add_months(current_date(),-36) option
 












You also have the option to change the dates/year to start . In order to achieve this use F.trunc("end_date", "month") and F.trunc("end_date", "year") 

 




8 comments:

  1. This site helps to clear your all query.
    This is really worth reading. nice informative article.
    madhya pradesh post matric scholarship
    ambedkar international scholarship scheme

    ReplyDelete
  2. Thank you. I could see your page is also looking great. Will be sharing the info to others

    ReplyDelete
  3. Thank you. I could see your page is also looking great. Will be sharing the info to others who are looking for SAP training.

    ReplyDelete
  4. Will share the links to students who are looking for these competancies

    ReplyDelete

  5. You have a nice content, Thank you ! Learning digital marketing is so fascinating and you can even grow your brand so for more detail visit: Digital Marketing Training in Ujjain

    ReplyDelete
  6. Thank you for your wonderful content and it is very meaningful as well as attractive Bhutan National Park do share more la.

    ReplyDelete