Hi guys i wanted to change this in pyspark dataframe
| player_id | stat_week|moves|week_num|
|1 |2022-06-13| 1| 24|
|1 |2022-06-06| 20| 23|
|1 |2022-06-20| 0| 25|
|2 |2022-06-06| 20| 23|
|2 |2022-06-13| 0| 24|
|2 |2022-06-20| 0| 25|
|1 |2022-05-30| 10| 22|
|1 |2022-05-23| 20| 21|
|1 |2022-05-16| 20| 20|
into
| player_id |moves |week_num | group by
|1 |(20,20,10)|(20,21,22) | 1
|1 |(20,1,0). |(23,24,25) | 2
|2 |(20,0,0). |(23,24,25) | 1
how can i do to group 3 weeks data and aggregate them as tuple ?
any help appreciated~~