'How to group data which is giveninto dates to week.Can someone give pyspark query for this

I am using pyspark ,i want to group my data into weekly.How can i do it

i tried so many ways but didn't get any of them run.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source